當前位置:首頁 » 操作系統 » 放置游戲源碼

放置游戲源碼

發布時間: 2023-05-30 10:51:37

Ⅰ 哪個網站有。所有所有游戲的源代碼

您好,現在很多網站都可以查詢到游戲的源代碼。
例如17171、u9、766都是可以進行相關查詢的。
源代碼(也稱源程序)是指未編譯的按照一定的程序設計語言規范書寫的文本文件,是一系列人類可讀的計算機語言指令。
在現代程序語言中,源代碼可以是以書籍或者磁帶的形式出現,但最為常用的格式是文本文件,這種典型格式的目的是為了編譯出計算機程序。

Ⅱ 有沒有放置修真游戲源碼

這個我覺得應該是有的,因為這個游戲代碼這一塊需要好好弄,一般肯定是有資源的

Ⅲ 游戲軟體怎麼查看源代碼

游戲都是進行過編譯,加密的無法看到源代碼。如果你想查看的游戲是開源的,可以到游戲的開源網站進行查看。

查看APP應用的源代碼的具體方法步驟如下:

1、首先在電腦內下載並安裝獲取網頁源碼app。

2、然後單擊打開網頁源碼APP並在APP中的輸入框內輸入想要查看的網址,再在界面內找到GO選項單並單擊。

3、單擊後等待APP最後載入3秒就可以成功的獲取APP源代碼並查看了。

Android 系統源代碼多大

是指sdk的源碼,還是android操作系統的源碼,不過都有10G左右,另外sdk的源碼是用git管理的,一次下載後,用git check就可以切換到各個版本。

Android SDK是用於開發Android上java應用程序的,另外發布Android NDK,可以添加一些C語言寫的鏈接庫,至於Linux代碼,可以在Android源代碼中找到(SDK程序中只有編譯好的測試映像)。

應用程序開發用不到Linux代碼(搞嵌入式開發才會用到,而SDK不負責底層開發)。

Ⅳ (完整word版)純C語言寫的一個小型游戲 源代碼

"掃雷"小游戲C代碼

#include<stdio.h>
#include<math.h>
#include<time.h>
#include<stdlib.h>
main( )
{char a[102][102],b[102][102],c[102][102],w;
int i,j; /*循環變數*/
int x,y,z[999]; /*雷的位置*/
int t,s; /*標記*/
int m,n,lei; /*計數*/
int u,v; /*輸入*/
int hang,lie,ge,mo; /*自定義變數*/
srand((int)time(NULL)); /*啟動隨機數發生器*/
leb1: /*選擇模式*/
printf(" 請選擇模式: 1.標准 2.自定義 ");
scanf("%d",&mo);
if(mo==2) /*若選擇自定義模式,要輸入三個參數*/
{do
{t=0; printf("請輸入 行數 列數 雷的個數 ");
scanf("%d%d%d",&hang,&lie,&ge);
if(hang<2){printf("行數太少 "); t=1;}
if(hang>100){printf("行數太多 ");t=1;}
if(lie<2){printf("列數太少 ");t=1;}
if(lie>100){printf("列數太多 ");t=1;}
if(ge<1){printf("至少要有一個雷 ");t=1;}
if(ge>=(hang*lie)){printf("雷太多了 ");t=1;}
}while(t==1);
}
else{hang=10,lie=10,ge=10;} /*否則就是選擇了標准模式(默認參數)*/
for(i=1;i<=ge;i=i+1) /*確定雷的位置*/
{do
{t=0; z[i]=rand( )%(hang*lie);
for(j=1;j<i;j=j+1){if(z[i]==z[j]) t=1;}
}while(t==1);
}
for(i=0;i<=hang+1;i=i+1) /*初始化a,b,c*/
{for(j=0;j<=lie+1;j=j+1) {a[i][j]='1'; b[i][j]='1'; c[i][j]='0';} }
for(i=1;i<=hang;i=i+1)
{for(j=1;j<=lie;j=j+1) {a[i][j]='+';} }
for(i=1;i<=ge;i=i+1) /*把雷放入c*/
{x=z[i]/lie+1; y=z[i]%lie+1; c[x][y]='#';}
for(i=1;i<=hang;i=i+1) /*計算b中數字*/
{for(j=1;j<=lie;j=j+1)
{m=48;
if(c[i-1][j-1]=='#')m=m+1; if(c[i][j-1]=='#')m=m+1;
if(c[i-1][j]=='#')m=m+1; if(c[i+1][j+1]=='#')m=m+1;
if(c[i][j+1]=='#')m=m+1; if(c[i+1][j]=='#')m=m+1;
if(c[i+1][j-1]=='#')m=m+1; if(c[i-1][j+1]=='#')m=m+1;
b[i][j]=m;
}
}
for(i=1;i<=ge;i=i+1) /*把雷放入b中*/
{x=z[i]/lie+1; y=z[i]%lie+1; b[x][y]='#';}

lei=ge; /*以下是游戲設計*/
do
{leb2: /*輸出*/
system("cls");printf(" ");

printf(" ");
for(i=1;i<=lie;i=i+1)
{w=(i-1)/10+48; printf("%c",w);
w=(i-1)%10+48; printf("%c ",w);
}
printf(" |");
for(i=1;i<=lie;i=i+1){printf("---|");}
printf(" ");
for(i=1;i<=hang;i=i+1)
{w=(i-1)/10+48; printf("%c",w);
w=(i-1)%10+48; printf("%c |",w);
for(j=1;j<=lie;j=j+1)
{if(a[i][j]=='0')printf(" |");
else printf(" %c |",a[i][j]);
}
if(i==2)printf(" 剩餘雷個數");
if(i==3)printf(" %d",lei);
printf(" |");
for(j=1;j<=lie;j=j+1){printf("---|");}
printf(" ");
}

scanf("%d%c%d",&u,&w,&v); /*輸入*/
u=u+1,v=v+1;
if(w!='#'&&a[u][v]=='@')
goto leb2;
if(w=='#')
{if(a[u][v]=='+'){a[u][v]='@'; lei=lei-1;}
else if(a[u][v]=='@'){a[u][v]='?'; lei=lei+1;}
else if(a[u][v]=='?'){a[u][v]='+';}
goto leb2;
}
a[u][v]=b[u][v];

leb3: /*打開0區*/
t=0;
if(a[u][v]=='0')
{for(i=1;i<=hang;i=i+1)
{for(j=1;j<=lie;j=j+1)
{s=0;
if(a[i-1][j-1]=='0')s=1; if(a[i-1][j+1]=='0')s=1;
if(a[i-1][j]=='0')s=1; if(a[i+1][j-1]=='0')s=1;
if(a[i+1][j+1]=='0')s=1; if(a[i+1][j]=='0')s=1;
if(a[i][j-1]=='0')s=1; if(a[i][j+1]=='0')s=1;
if(s==1)a[i][j]=b[i][j];
}
}
for(i=1;i<=hang;i=i+1)
{for(j=lie;j>=1;j=j-1)
{s=0;
if(a[i-1][j-1]=='0')s=1; if(a[i-1][j+1]=='0')s=1;
if(a[i-1][j]=='0')s=1; if(a[i+1][j-1]=='0')s=1;
if(a[i+1][j+1]=='0')s=1; if(a[i+1][j]=='0')s=1;
if(a[i][j-1]=='0')s=1; if(a[i][j+1]=='0')s=1;
if(s==1)a[i][j]=b[i][j];
}
}
for(i=hang;i>=1;i=i-1)
{for(j=1;j<=lie;j=j+1)
{s=0;
if(a[i-1][j-1]=='0')s=1; if(a[i-1][j+1]=='0')s=1;
if(a[i-1][j]=='0')s=1; if(a[i+1][j-1]=='0')s=1;
if(a[i+1][j+1]=='0')s=1; if(a[i+1][j]=='0')s=1;
if(a[i][j-1]=='0')s=1; if(a[i][j+1]=='0')s=1;
if(s==1)a[i][j]=b[i][j];
}
}
for(i=hang;i>=1;i=i-1)
{for(j=lie;j>=1;j=j-1)
{s=0;
if(a[i-1][j-1]=='0')s=1; if(a[i-1][j+1]=='0')s=1;
if(a[i-1][j]=='0')s=1; if(a[i+1][j-1]=='0')s=1;
if(a[i+1][j+1]=='0')s=1;if(a[i+1][j]=='0')s=1;
if(a[i][j-1]=='0')s=1; if(a[i][j+1]=='0')s=1;
if(s==1)a[i][j]=b[i][j];
}
}

for(i=1;i<=hang;i=i+1) /*檢測0區*/
{for(j=1;j<=lie;j=j+1)
{if(a[i][j]=='0')
{if(a[i-1][j-1]=='+'||a[i-1][j-1]=='@'||a[i-1][j-1]=='?')t=1;
if(a[i-1][j+1]=='+'||a[i-1][j+1]=='@'||a[i-1][j+1]=='?')t=1;
if(a[i+1][j-1]=='+'||a[i+1][j-1]=='@'||a[i+1][j-1]=='?')t=1;
if(a[i+1][j+1]=='+'||a[i+1][j+1]=='@'||a[i+1][j+1]=='?')t=1;
if(a[i+1][j]=='+'||a[i+1][j]=='@'||a[i+1][j]=='?')t=1;
if(a[i][j+1]=='+'||a[i][j+1]=='@'||a[i][j+1]=='?')t=1;
if(a[i][j-1]=='+'||a[i][j-1]=='@'||a[i][j-1]=='?')t=1;
if(a[i-1][j]=='+'||a[i-1][j]=='@'||a[i-1][j]=='?')t=1;
}
}
}
if(t==1)goto leb3;
}

n=0; /*檢查結束*/
for(i=1;i<=hang;i=i+1)
{for(j=1;j<=lie;j=j+1)
{if(a[i][j]!='+'&&a[i][j]!='@'&&a[i][j]!='?')n=n+1;}
}
}
while(a[u][v]!='#'&&n!=(hang*lie-ge));

for(i=1;i<=ge;i=i+1) /*游戲結束*/
{x=z[i]/lie+1; y=z[i]%lie+1; a[x][y]='#'; }
printf(" ");
for(i=1;i<=lie;i=i+1)
{w=(i-1)/10+48; printf("%c",w);
w=(i-1)%10+48; printf("%c ",w);
}
printf(" |");
for(i=1;i<=lie;i=i+1){printf("---|");}
printf(" ");
for(i=1;i<=hang;i=i+1)
{w=(i-1)/10+48; printf("%c",w);
w=(i-1)%10+48; printf("%c |",w);
for(j=1;j<=lie;j=j+1)
{if(a[i][j]=='0')printf(" |");
else printf(" %c |",a[i][j]);
}
if(i==2)printf(" 剩餘雷個數");
if(i==3)printf(" %d",lei); printf(" |");
for(j=1;j<=lie;j=j+1) {printf("---|");}
printf(" ");
}
if(n==(hang*lie-ge)) printf("你成功了! ");
else printf(" 游戲結束! ");
printf(" 重玩請輸入1 ");
t=0;
scanf("%d",&t);
if(t==1)goto leb1;
}

/*註:在DEV c++上運行通過。行號和列號都從0開始,比如要確定第0行第9列不是「雷」,就在0和9中間加入一個字母,可以輸入【0a9】三個字元再按回車鍵。3行7列不是雷,則輸入【3a7】回車;第8行第5列是雷,就輸入【8#5】回車,9行0列是雷則輸入【9#0】並回車*/

Ⅳ 怎樣獲得一款游戲的源代碼

源碼可以找游戲公司要,比如夢幻誅仙為什麼那麼多私服,就是源碼搭出來的

Ⅵ 什麼軟體可以看到游戲的源代碼

軟體游戲都是封裝好了再交付用戶使用的,一般不會透露源代碼。現在只有一些反編軟體可以看到很低級的機器語言和匯編語言,想看高級語言的話應該是看不到的,你想啊,那麼容易讓你看到了,人家的版權利益怎麼保障啊

Ⅶ 求C++小游戲源代碼啊~

一個戀愛小測試賊靈驗哦
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n,m,a,b,c,d,e,f,g,h,i,j,k,l,sum;
cout<<"歡迎來到戀愛指數測試器*>-<*"<<endl;
for(int i=1;i<=1000000000;i++)
l=i;
cout<<"獨家的哦*^0^*"<<endl;
for(int i=1;i<=1000000000;i++)
l=i;
cout<<"以下異性均為合適年齡"<<endl;
for(int i=1;i<=1000000000;i++)
l=i;
cout<<"下列問題如果是則輸入2,如果不是則輸入1,一點也沒感覺輸入0"<<endl;
for(int i=1;i<=1000000000;i++)
l=i;
cout<<"加油,面對你自己!*-o-*"<<endl;
for(int i=1;i<=1000000000;i++)
l=i;
cout<<"question one:"<<"你是否面對異性時有莫名心跳?"<<endl;
cin>>n;
cout<<endl;
cout<<"question two:"<<"你是否有看到異性被撩時很憤怒?"<<endl;
cin>>m;
cout<<endl;
cout<<"question three:"<<"你是否懼怕見到一位異性的家長"<<endl;
cin>>a;
cout<<endl;
cout<<"question four:"<<"你是否經常刷一位異性的QQ或其他軟體"<<endl;
cin>>b;
cout<<endl;
cout<<"question five:"<<"想不想真心和Ta用情頭?"<<endl;
cin>>c;
cout<<endl;
cout<<"question six:"<<"和Ta邂逅過嗎?"<<endl;
cin>>d;
cout<<endl;
cout<<"question seven:"<<"吃過同一個飯碗里的東西嗎?"<<endl;
cin>>e;
cout<<endl;
cout<<"question eight:"<<"有過一個人在夢里與Ta相遇嗎?"<<endl;
cin>>f;
cout<<endl;
cout<<"question nine:"<<"有為了等Ta一個人站在風雨中嗎?"<<endl;
cin>>g;
cout<<endl;
cout<<"question ten:"<<"想kissTa不,想摸Ta的頭發嗎?"<<endl;
cin>>h;
cout<<endl;
sum=n+m+a+b+c+d+e+f+g+h;
cout<<"正在測評中,請稍後..."<<endl;
for(int i=1;i<=1000000000;i++)
l=i;
if(sum>=16&&sum<=20)
cout<<"你的戀愛指數為:A。你是一個深深愛著Ta的人,你往往會走到最後^-^。"<<endl;
if(sum<=15&&sum>=12)
cout<<"你的戀愛指數為:B。你是一個矛盾卻又不失愛意的人,你的愛往往一波三折!-!。"<<endl;
if(sum<=11&&sum>=7)
cout<<"你的戀愛指數為:C。你是一個有點點情絲的人,你想表,卻又懼怕現實,你仍須努力o-o。"<<endl;
if(sum<=6&&sum>=0)
cout<<"你的戀愛指數為:D。你是一個無暇無垢,不食人間煙火的人,想一路踏歌,證道路上需佳人陪伴+-+。"<<endl;
if(sum>20||sum<0)
cout<<"你出格了喲ooo.ooo"<<endl;
cout<<"人生在世,恍如昨世,孤獨的身影終難走遠,你的那個Ta就在不遠方,就如漫天繁星,總有一顆屬於你!"<<endl;\
cout<<"快抓緊你身邊的那個Ta^-^oooooo"<<endl;
cout<<endl;
cout<<"作品創造者:yang sky one"<<endl;
cout<<"戀愛指數測試器已關閉,需重啟………………"<<endl;
return 0;
}

Ⅷ 誰能給我一個手機游戲的源代碼啊

這個地址也有,不過直接給你吧,這樣比較好
先給你看看主要的類吧

package Game;

import DreamBubbleMidlet;

import java.io.IOException;
import java.util.Enumeration;
import java.util.Hashtable;

import javax.microedition.lci.Graphics;
import javax.microedition.lci.Image;
import javax.microedition.lci.game.GameCanvas;
import javax.microedition.lci.game.LayerManager;
import javax.microedition.lci.game.Sprite;

public class Game extends GameCanvas implements Runnable {

protected DreamBubbleMidlet dreamBubbleMidlet;

protected Graphics g;
protected Image loadingImage;
protected Image pauseImage;
protected Image cursorImage;
protected Image jackStateImage;
protected Image johnStateImage;
protected Image numberImage;

protected Sprite cursor;
protected Sprite number;
protected LayerManager cursorManager;
protected LayerManager numberManager;

protected Hashtable bombTable;
protected Map map;
protected LayerManager gameLayerManager;
protected Role player;
protected Sprite playerGhost;

protected int screenWidth;
protected int screenHeight;
protected int delay = 50;
protected int[][] bornPlace;
protected int chooseIndex;
protected int stageIndex = 1;
protected int gameClock;
protected int loadPercent;

protected boolean isPause;
protected boolean isEnd;
protected boolean isPlaying;
protected boolean isLoading;

protected Thread mainThread;

public Game(DreamBubbleMidlet dreamBubbleMidlet) {
super(false);
this.setFullScreenMode(true);
this.dreamBubbleMidlet = dreamBubbleMidlet;

this.screenWidth = this.getWidth();
this.screenHeight = this.getHeight();

try {
this.loadingImage = Image.createImage("/Game/Loading.png");
this.pauseImage = Image.createImage("/Game/Pause.png");
this.cursorImage = Image.createImage("/Game/Cursor.png");
this.jackStateImage = Image.createImage("/State/JackState.png");
this.johnStateImage = Image.createImage("/State/JohnState.png");
this.numberImage = Image.createImage("/State/Number.png");
} catch (IOException e) {
e.printStackTrace();
}

this.g = this.getGraphics();
}

public void loadStage(int stage) {
this.isEnd = false;
this.isPause = false;
this.isPlaying = false;
this.gameLayerManager = new LayerManager();
this.cursorManager = new LayerManager();
this.numberManager = new LayerManager();
this.bombTable = new Hashtable();
this.cursor = new Sprite(this.cursorImage, 32, 32);
this.number = new Sprite(this.numberImage, 12, 10);
this.loadPercent = 20;
sleep();

loadMap(stage);
this.loadPercent = 40;
sleep();

loadPlayer();
this.loadPercent = 60;
sleep();

this.gameLayerManager.append(map.getBombLayer());
this.gameLayerManager.append(map.getBuildLayer());
this.gameLayerManager.append(map.getToolLayer());
this.gameLayerManager.append(map.getFloorLayer());
this.gameLayerManager.setViewWindow(0, -5, screenWidth,
Global.MAP_HEIGHT + 5);
this.cursorManager.append(cursor);
this.numberManager.append(number);
this.loadPercent = 80;
sleep();

this.loadPercent = 100;
sleep();
isPlaying = true;
}

public void run() {
while (!isEnd) {
long beginTime = System.currentTimeMillis();
this.drawScreen();
long endTime = System.currentTimeMillis();
if (endTime - beginTime < this.delay) {
try {
Thread.sleep(this.delay - (endTime - beginTime));
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
}

public void loadMap(int stage) {
switch (stage) {
case 0:
this.map = new Map(Global.MAP_BLOCK);
this.bornPlace = Global.MAP_BLOCK_BORNPLACE;
break;
case 1:
this.map = new Map(Global.MAP_FACTORY);
this.bornPlace = Global.MAP_FACTORY_BORNPLACE;
break;
case 2:
this.map = new Map(Global.MAP_FOREST);
this.bornPlace = Global.MAP_FOREST_BORNPLACE;
break;
case 3:
this.map = new Map(Global.MAP_PIRATE);
this.bornPlace = Global.MAP_PIRATE_BORNPLACE;
break;
case 4:
this.map = new Map(Global.MAP_FAUBOURG);
this.bornPlace = Global.MAP_FAUBOURG_BORNPLACE;
break;
}
}

public void loadPlayer() {
this.player = SingleGameRole.createSingleGameRole(this, Global.JACK,
this.bornPlace[0][0], this.bornPlace[0][1]);
this.gameLayerManager.append(player);
try {
this.playerGhost = new Sprite(Image.createImage("/Character/Jack.png"),
this.player.width, this.player.height);
this.gameLayerManager.append(playerGhost);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}

public void playerUpdate() {
if(!this.player.isAlive)
this.playerGhost.setVisible(false);
this.playerGhost.setFrame(this.player.getFrame());
this.player.updateRole();
}

public void bombUpdate() {
Enumeration enu = this.bombTable.keys();
while (enu.hasMoreElements()) {
String key = (String) enu.nextElement();
Bomb bomb = (Bomb) (bombTable.get(key));

if (bomb.isvisable) {
bomb.update();
} else {
bombTable.remove(key);
bomb = null;
}
}
}

public void mapUpdate() {
this.map.update();
}

public void drawScreen() {
if (gameClock < 10000)
gameClock++;
else
gameClock = 0;
if (!this.isLoading) {
if (!isPause) {
this.operate();
this.bombUpdate();
this.playerUpdate();
this.mapUpdate();
g.setColor(0x000000);
g.fillRect(0, 0, getWidth(), getHeight());
this.drawState();
gameLayerManager.paint(g, 0, this.screenHeight
- Global.MAP_HEIGHT - 5);
} else {
this.drawPauseFrame();
}
} else {
this.drawLoadingFrame();
}
this.flushGraphics();
}

public void drawFailScreen() {

}

public void drawState() {
if (this.player.type == Global.JACK) {
g.drawImage(jackStateImage, 60, 5, Graphics.TOP | Graphics.LEFT);
}
if (this.player.type == Global.JOHN) {
g.drawImage(johnStateImage, 60, 5, Graphics.TOP | Graphics.LEFT);
}

this.number.setFrame(this.player.bombNums);
this.numberManager.paint(g, 101, 15);
this.number.setFrame(this.player.speed);
this.numberManager.paint(g, 133, 15);
this.number.setFrame(this.player.power);
this.numberManager.paint(g, 165, 15);
}

protected void drawPauseFrame() {
g.setColor(0x000000);
g.fillRect(0, 0, getWidth(), getHeight());
this.drawState();
if (gameClock % 5 == 0)
this.cursor.setFrame((this.cursor.getFrame() + 1) % 4);
this.gameLayerManager.paint(g, 0, this.screenHeight - Global.MAP_HEIGHT
- 5);
this.cursorManager.paint(g, screenWidth / 2 - pauseImage.getWidth() / 2
- 32, screenHeight / 2 - pauseImage.getHeight() / 2
+ this.chooseIndex * 33 + 24);
g.drawImage(pauseImage, screenWidth / 2, screenHeight / 2,
Graphics.HCENTER | Graphics.VCENTER);
}

protected void drawLoadingFrame() {
g.setColor(66, 70, 246);
g.fillRect(0, 0, screenWidth, screenHeight);

g.drawImage(loadingImage, screenWidth / 2, 2 * screenHeight / 5,
Graphics.HCENTER | Graphics.VCENTER);

g.setColor(0, 255, 0);
g.fillRect((screenWidth - 120) / 2, 2 * screenHeight / 3,
(this.loadPercent * 120) / 100, 10);

g.setColor(255, 0, 0);
g.drawRect((screenWidth - 120) / 2, 2 * screenHeight / 3, 120, 10);
}

public void showMe() {
new Loading(this.stageIndex);
if (this.mainThread == null) {
mainThread = new Thread(this);
mainThread.start();
}
this.dreamBubbleMidlet.show(this);
}

public void operate() {
int keyStates = getKeyStates();
this.playerGhost.setPosition(this.player.xCoodinate, this.player.yCoodinate);
if ((keyStates & DOWN_PRESSED) != 0) {
this.player.walk(Global.SOUTH);
} else {
if ((keyStates & UP_PRESSED) != 0) {
this.player.walk(Global.NORTH);
} else {
if ((keyStates & RIGHT_PRESSED) != 0) {
this.player.walk(Global.EAST);
} else {
if ((keyStates & LEFT_PRESSED) != 0) {
this.player.walk(Global.WEST);
}
}
}
}
}

protected void keyPressed(int key) {
if (!this.isPlaying)
return;
if (!this.isPause && key == -7) {// 右鍵
this.chooseIndex = 0;
this.pauseGame();
return;
}
if (key == 35) {// #鍵
this.nextStage();
return;
}
if (key == 42) {// *鍵
this.preStage();
return;
}
if (this.isPause) {
switch (key) {
case -1:
case -3:
if (this.chooseIndex == 0)
this.chooseIndex = 2;
else
this.chooseIndex = (this.chooseIndex - 1) % 3;
break;
case -2:
case -4:
this.chooseIndex = (this.chooseIndex + 1) % 3;
break;
case -5:// 確認鍵
case -6:// 左軟鍵
switch (chooseIndex) {
case 0:
this.continueGame();
break;
case 1:
this.restart();
break;
case 2:
this.endGame();
break;
}
break;
default:
break;
}
} else {
switch (key) {
case 53:
case -5:// 確認鍵
this.player.setBomb(this.player.getRow(), this.player.getCol());
break;
}
}
}

public void restart() {
new Loading(this.stageIndex);
}

public void continueGame() {
this.isPause = false;
this.player.play();
}

public void pauseGame() {
this.isPause = true;
this.player.stop();
}

public void endGame() {
this.isEnd = true;
this.mainThread = null;
System.gc();
try {
Thread.sleep(500);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
this.dreamBubbleMidlet.menu.showMe();
}

public void nextStage() {
if (this.stageIndex < 4) {
this.stageIndex++;
}
new Loading(this.stageIndex);
}

public void preStage() {
if (this.stageIndex > 0) {
this.stageIndex--;
}
new Loading(this.stageIndex);
}

class Loading implements Runnable {
private Thread innerThread;
private int stageIndex;

public Loading(int stageIndex) {
this.stageIndex = stageIndex;
innerThread = new Thread(this);
innerThread.start();
}

public void run() {
isLoading = true;
loadPercent = 0;
System.gc();
loadStage(stageIndex);
isLoading = false;
}
}

public void sleep() {
try {
Thread.sleep(100);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}

這個是游戲主體類

下面是游戲的人物類

package Game;

import javax.microedition.lci.Image;
import javax.microedition.lci.game.Sprite;

public abstract class Role extends Sprite {

/**
* 人物的基本屬性
*/
protected int type;
protected int xCoodinate;
protected int yCoodinate;
protected int row;
protected int col;
protected int width;
protected int height;
protected int speed;
protected int status;
protected boolean isCanOperate = false;
protected boolean isAlive = true;

/**
* 人物放置炸彈的基本屬性
*/
protected int power;
protected int bombNums;

protected int characterClock = 0;
protected int deadTime = 0;

protected Game game;

protected Role(Image image, int width, int Height, Game game) {
super(image, width, Height);
this.game = game;
}

/**
* 人物拾起道具
* @param tool
*/
public abstract void pickupTool(int tool);
/**
* 碰撞檢測以及坐標的改變,如果對行走條件有特殊需求,既可以在這里寫自己的條件
* @param direction
*/
public abstract void collisionCheck(int direction);

public void updateRole() {
if (this.characterClock < 10000) {
this.characterClock++;
} else {
this.characterClock = 100;
}

int row = this.getRow();
int col = this.getCol();

if (this.isAlive) {

int tool = this.game.map.getToolLayer().getCell(col, row);

if (tool > 0) {
this.pickupTool(tool);
this.game.map.getToolLayer().setCell(col, row, 0);
}

if (this.game.map.hasFeature(row, col, Global.DEADLY)) {
this.isAlive = false;
return;
}

if (this.status == Global.BORN
&& this.characterClock > Global.BORN_TIME) {
this.status = Global.SOUTH;
this.setFrame(Global.SOUTH * 6);
this.isCanOperate = true;
}

if (this.status == Global.BORN) {
if (this.characterClock % 2 == 0)
this.setFrame(Global.BORN * 6 + (this.getFrame() - 1) % 4);
return;
}

} else {
this.isCanOperate = false;
if (this.deadTime <= 20) {
this.deadTime++;
} else {
this.deadTime = 100;
this.setVisible(false);
return;
}

if (this.characterClock % 2 == 0) {
if (this.getFrame() < Global.DEAD * 6) {
this.setFrame(Global.DEAD * 6);
} else {
if (this.getFrame() < 29) {
this.setFrame(this.getFrame() + 1);
} else {
if (this.characterClock % 4 == 0) {
this.setFrame(29);
this.setVisible(true);
} else {
this.setVisible(false);
}
}
}
}
}
}

public void walk(int direction) {
if (!isAlive)
return;
if (!isCanOperate)
return;
if(direction==9) return;
this.collisionCheck(direction);

if (this.characterClock % 2 == 0) {
if (this.status == direction) {
this.setFrame(this.status * 6 + (this.getFrame() + 1) % 6);
} else {
this.status = direction;
this.setFrame(this.status * 6);
}
}
this.setPosition(xCoodinate, yCoodinate);
}

public void stop() {
this.isCanOperate = false;
}

public void play() {
this.isCanOperate = true;
}

public abstract void setBomb(int row, int col);

public void increaseBomb() {
if (this.bombNums < Global.MAX_BOMB_NUMBER)
this.bombNums++;
}

public int getRow() {
return getRow(getBottomY(yCoodinate) - Global.MAP_CELL / 2);
}

public int getCol() {
return getCol(xCoodinate + Global.MAP_CELL / 2);
}

protected int getBottomY(int y) {
return y + this.height - 1;
}

protected int getRightX(int x) {
return x + Global.MAP_CELL - 1;
}

protected int getPreY(int y) {
return getBottomY(y) + 1 - Global.MAP_CELL;
}

protected int getRow(int x) {
return x / Global.MAP_CELL;
}

protected int getCol(int y) {
return y / Global.MAP_CELL;
}
}

我的QQ是609419340

看不明白的可以隨時來問我哦,還可以當時傳給你撒

Ⅸ 跪求用C++語言編寫的小游戲的源代碼

像素射擊:int anim abc_fade_in 0x7f010001
int anim abc_fade_out 0x7f010002
int anim abc_grow_fade_in_from_bottom 0x7f010003
int anim abc_popup_enter 0x7f010004
int anim abc_popup_exit 0x7f010005
int anim abc_shrink_fade_out_from_bottom 0x7f010006
int anim abc_slide_in_bottom 0x7f010007
int anim abc_slide_in_top 0x7f010008
int anim abc_slide_out_bottom 0x7f010009
int anim abc_slide_out_top 0x7f01000a
int anim abc_tooltip_enter 0x7f01000b
int anim abc_tooltip_exit 0x7f01000c
int attr actionBarDivider 0x7f040001
int attr actionBarItemBackground 0x7f040002
int attr actionBarPopupTheme 0x7f040003
int attr actionBarSize 0x7f040004
int attr actionBarSplitStyle 0x7f040005
int attr actionBarStyle 0x7f040006
int attr actionBarTabBarStyle 0x7f040007
int attr actionBarTabStyle 0x7f040008
int attr actionBarTabTextStyle 0x7f040009
int attr actionBarTheme 0x7f04000a
int attr actionBarWidgetTheme 0x7f04000b
int attr actionButtonStyle 0x7f04000c
int attr actionDropDownStyle 0x7f04000d
int attr actionLayout 0x7f04000e
int attr actionMenuTextAppearance 0x7f04000f
int attr actionMenuTextColor 0x7f040010
int attr actionModeBackground 0x7f040011
int attr actionModeCloseButtonStyle 0x7f040012
int attr actionModeCloseDrawable 0x7f040013
int attr actionModeCopyDrawable 0x7f040014
int attr actionModeCutDrawable 0x7f040015
int attr actionModeFindDrawable 0x7f040016
int attr actionModePasteDrawable 0x7f040017
int attr actionModePopupWindowStyle 0x7f040018
int attr actionModeSelectAllDrawable 0x7f040019
int attr actionModeShareDrawable 0x7f04001a
int attr actionModeSplitBackground 0x7f04001b
int attr actionModeStyle 0x7f04001c
int attr actionModeWebSearchDrawable 0x7f04001d
int attr actionOverflowButtonStyle 0x7f04001e
int attr actionOverflowMenuStyle 0x7f04001f
int attr actionProviderClass 0x7f040020
int attr actionViewClass 0x7f040021
int attr activityChooserViewStyle 0x7f040022
int attr alertDialogButtonGroupStyle 0x7f040023
int attr alertDialogCenterButtons 0x7f040024
int attr alertDialogStyle 0x7f040025
int attr alertDialogTheme 0x7f040026
int attr allowStacking 0x7f040027
int attr alpha 0x7f040028
int attr alphabeticModifiers 0x7f040029
int attr arrowHeadLength 0x7f04002a
int attr arrowShaftLength 0x7f04002b
int attr autoCompleteTextViewStyle 0x7f04002c
int attr autoSizeMaxTextSize 0x7f04002d
int attr autoSizeMinTextSize 0x7f04002e
int attr autoSizePresetSizes 0x7f04002f
int attr autoSizeStepGranularity 0x7f040030
int attr autoSizeTextType 0x7f040031
int attr background 0x7f040032
int attr backgroundSplit 0x7f040033
int attr backgroundStacked 0x7f040034
int attr backgroundTint 0x7f040035
int attr backgroundTintMode 0x7f040036
int attr barLength 0x7f040037
int attr borderlessButtonStyle 0x7f040038
int attr buttonBarButtonStyle 0x7f040039
int attr buttonBarNegativeButtonStyle 0x7f04003a
int attr buttonBarNeutralButtonStyle 0x7f04003b
int attr buttonBarPositiveButtonStyle 0x7f04003c
int attr buttonBarStyle 0x7f04003d
int attr buttonGravity 0x7f04003e
int attr buttonIconDimen 0x7f04003f
int attr buttonPanelSideLayout 0x7f040040
int attr buttonStyle 0x7f040041
int attr buttonStyleSmall 0x7f040042
int attr buttonTint 0x7f040043
int attr buttonTintMode 0x7f040044
int attr checkboxStyle 0x7f040045
int attr checkedTextViewStyle 0x7f040046
int attr closeIcon 0x7f040047
int attr closeItemLayout 0x7f040048
int attr collapseContentDescription 0x7f040049
int attr collapseIcon 0x7f04004a
int attr color 0x7f04004b
int attr colorAccent 0x7f04004c
int attr colorBackgroundFloating 0x7f04004d
int attr colorButtonNormal 0x7f04004e
int attr colorControlActivated 0x7f04004f
int attr colorControlHighlight 0x7f040050
int attr colorControlNormal 0x7f040051
int attr colorError 0x7f040052
int attr colorPrimary 0x7f040053
int attr colorPrimaryDark 0x7f040054
int attr colorSwitchThumbNormal 0x7f040055
int attr commitIcon 0x7f040056
int attr contentDescription 0x7f040057
int attr contentInsetEnd 0x7f040058
int attr contentInsetEndWithActions 0x7f040059
int attr contentInsetLeft 0x7f04005a
int attr contentInsetRight 0x7f04005b
int attr contentInsetStart 0x7f04005c
int attr 0x7f04005d
int attr controlBackground 0x7f04005e
int attr coordinatorLayoutStyle 0x7f04005f
int attr customNavigationLayout 0x7f040060
int attr defaultQueryHint 0x7f040061
int attr dialogCornerRadius 0x7f040062
int attr dialogPreferredPadding 0x7f040063
int attr dialogTheme 0x7f040064
int attr displayOptions 0x7f040065
int attr divider 0x7f040066
int attr dividerHorizontal 0x7f040067
int attr dividerPadding 0x7f040068
int attr dividerVertical 0x7f040069
int attr drawableSize 0x7f04006a
int attr drawerArrowStyle 0x7f04006b
int attr dropDownListViewStyle 0x7f04006c
int attr 0x7f04006d
int attr editTextBackground 0x7f04006e
int attr editTextColor 0x7f04006f
int attr editTextStyle 0x7f040070
int attr elevation 0x7f040071
int attr 0x7f040072
int attr firstBaselineToTopHeight 0x7f040073
int attr font 0x7f040074
int attr fontFamily 0x7f040075
int attr fontProviderAuthority 0x7f040076
int attr fontProviderCerts 0x7f040077
int attr fontProviderFetchStrategy 0x7f040078
int attr fontProviderFetchTimeout 0x7f040079
int attr fontProviderPackage 0x7f04007a
int attr fontProviderQuery 0x7f04007b
int attr fontStyle 0x7f04007c
int attr fontVariationSettings 0x7f04007d
int attr fontWeight 0x7f04007e
int attr gapBetweenBars 0x7f04007f
int attr goIcon 0x7f040080
int attr height 0x7f040081
int attr hideOnContentScroll 0x7f040082
int attr homeAsUpIndicator 0x7f040083
int attr homeLayout 0x7f040084
int attr icon 0x7f040085
int attr iconTint 0x7f040086
int attr iconTintMode 0x7f040087
int attr iconifiedByDefault 0x7f040088
int attr imageButtonStyle 0x7f040089
int attr indeterminateProgressStyle 0x7f04008a
int attr initialActivityCount 0x7f04008b
int attr isLightTheme 0x7f04008c
int attr itemPadding 0x7f04008d
int attr keylines 0x7f04008e
int attr lastBaselineToBottomHeight 0x7f04008f
int attr layout 0x7f040090
int attr layout_anchor 0x7f040091
int attr layout_anchorGravity 0x7f040092
int attr layout_behavior 0x7f040093
int attr layout_dodgeInsetEdges 0x7f040094
int attr layout_insetEdge 0x7f040095
int attr layout_keyline 0x7f040096
int attr lineHeight 0x7f040097
int attr listChoiceBackgroundIndicator 0x7f040098
int attr listDividerAlertDialog 0x7f040099
int attr listItemLayout 0x7f04009a
int attr listLayout 0x7f04009b
int attr listMenuViewStyle 0x7f04009c
int attr listPopupWindowStyle 0x7f04009d
int attr listPreferredItemHeight 0x7f04009e
int attr listPreferredItemHeightLarge 0x7f04009f
int attr listPreferredItemHeightSmall 0x7f0400a0
int attr listPreferredItemPaddingLeft 0x7f0400a1
int attr listPreferredItemPaddingRight 0x7f0400a2
int attr logo 0x7f0400a3
int attr logoDescription 0x7f0400a4
int attr maxButtonHeight 0x7f0400a5
int attr measureWithLargestChild 0x7f0400a6
int attr multiChoiceItemLayout 0x7f0400a7
int attr navigationContentDescription 0x7f0400a8
int attr navigationIcon 0x7f0400a9
int attr navigationMode 0x7f0400aa
int attr numericModifiers 0x7f0400ab
int attr overlapAnchor 0x7f0400ac
int attr paddingBottomNoButtons 0x7f0400ad
int attr paddingEnd 0x7f0400ae
int attr paddingStart 0x7f0400af
int attr paddingTopNoTitle 0x7f0400b0
int attr panelBackground 0x7f0400b1
int attr panelMenuListTheme 0x7f0400b2
int attr panelMenuListWidth 0x7f0400b3
int attr popupMenuStyle 0x7f0400b4
int attr popupTheme 0x7f0400b5
int attr popupWindowStyle 0x7f0400b6
int attr preserveIconSpacing 0x7f0400b7
int attr progressBarPadding 0x7f0400b8
int attr progressBarStyle 0x7f0400b9
int attr queryBackground 0x7f0400ba
int attr queryHint 0x7f0400bb
int attr radioButtonStyle 0x7f0400bc
int attr ratingBarStyle 0x7f0400bd
int attr ratingBarStyleIndicator 0x7f0400be
int attr ratingBarStyleSmall 0x7f0400bf
int attr searchHintIcon 0x7f0400c0
int attr searchIcon 0x7f0400c1
int attr searchViewStyle 0x7f0400c2
int attr seekBarStyle 0x7f0400c3
int attr selectableItemBackground 0x7f0400c4
int attr 0x7f0400c5
int attr showAsAction 0x7f0400c6
int attr showDividers 0x7f0400c7
int attr showText 0x7f0400c8
int attr showTitle 0x7f0400c9
int attr singleChoiceItemLayout 0x7f0400ca
int attr spinBars 0x7f0400cb
int attr spinnerDropDownItemStyle 0x7f0400cc
int attr spinnerStyle 0x7f0400cd
int attr splitTrack 0x7f0400ce
int attr srcCompat 0x7f0400cf
int attr state_above_anchor 0x7f0400d0
int attr statusBarBackground 0x7f0400d1
int attr subMenuArrow 0x7f0400d2
int attr submitBackground 0x7f0400d3
int attr subtitle 0x7f0400d4
int attr subtitleTextAppearance 0x7f0400d5
int attr subtitleTextColor 0x7f0400d6
int attr subtitleTextStyle 0x7f0400d7
int attr suggestionRowLayout 0x7f0400d8
int attr switchMinWidth 0x7f0400d9
int attr switchPadding 0x7f0400da
int attr switchStyle 0x7f0400db
int attr switchTextAppearance 0x7f0400dc
int attr textAllCaps 0x7f0400dd
int attr textAppearanceLargePopupMenu 0x7f0400de
int attr textAppearanceListItem 0x7f0400df
int attr 0x7f0400e0
int attr textAppearanceListItemSmall 0x7f0400e1
int attr textAppearancePopupMenuHeader 0x7f0400e2
int attr 0x7f0400e3
int attr 0x7f0400e4
int attr textAppearanceSmallPopupMenu 0x7f0400e5
int attr textColorAlertDialogListItem 0x7f0400e6
int attr textColorSearchUrl 0x7f0400e7
int attr theme 0x7f0400e8
int attr thickness 0x7f0400e9
int attr thumbTextPadding 0x7f0400ea
int attr thumbTint 0x7f0400eb
int attr thumbTintMode 0x7f0400ec
int attr tickMark 0x7f0400ed
int attr tickMarkTint 0x7f0400ee
int attr tickMarkTintMode 0x7f0400ef
int attr tint 0x7f0400f0
int attr tintMode 0x7f0400f1
int attr title 0x7f0400f2
int attr titleMargin 0x7f0400f3
int attr titleMarginBottom 0x7f0400f4
int attr titleMarginEnd 0x7f0400f5
int attr titleMarginStart 0x7f0400f6
int attr titleMarginTop 0x7f0400f7
int attr titleMargins 0x7f0400f8
int attr titleTextAppearance 0x7f0400f9
int attr titleTextColor 0x7f

Ⅹ 網路游戲的源代碼是什麼

網路游戲源代碼就是游戲的基礎,在外行人眼裡是無數行的英喊信文和數字,其實就是一組程序。x0dx0ax0dx0a作用當然是開發游戲啦。x0dx0a手上擁有了源代碼就可以製作游戲,當然如果你啥都不改,那功能就和原來的游戲沒什麼兩樣。x0dx0a現在網上你可以搜索一下網路游戲的源代碼還是非常鄭源輪多的,但是大多數都是不完整的,也就是說你即便得到了也無法用。x0dx0a另外只要這款游戲是國產的,你如果一模一樣也不行,因為違反版權。x0dx0a所以就算你拿到了源代碼,你也要有完整的美術資源,需要讓程裂沒序貼圖替換上去,達到視覺上不一樣的效果。世界背景和故事都要換,所有這些的成本當然不是一般的高。x0dx0a好吧,即便你搞好了,那接下來你還要運營吧,運營的成本就更高了。

熱點內容
ai壓縮腳本 發布:2024-03-28 23:41:10 瀏覽:987
危化品的存儲 發布:2024-03-28 23:02:09 瀏覽:608
qq重新設密碼怎麼設置 發布:2024-03-28 22:49:05 瀏覽:89
深圳航天信息稅盤伺服器地址 發布:2024-03-28 22:47:51 瀏覽:204
玩csol伺服器連接中斷怎麼辦 發布:2024-03-28 22:46:19 瀏覽:906
apk加密軟體 發布:2024-03-28 22:36:14 瀏覽:696
cpu不能直接訪問的存儲器 發布:2024-03-28 22:31:49 瀏覽:441
嘀嘀打車源碼 發布:2024-03-28 22:26:02 瀏覽:935
資料庫脆弱點 發布:2024-03-28 22:25:06 瀏覽:801
2021款es升級了哪些配置 發布:2024-03-28 21:26:44 瀏覽:384