源码资源网手游(正版源码网)

本篇文章给大家谈谈源码资源网手游,以及正版源码网对应的知识点,希望对各位有所帮助,不要忘了收藏本站喔。

本文目录一览:

谁知道安卓游戏源码下载的网站?

可以去易查、手游、手机乐园、等网站。进行相对应的机型绑定…就可以下载自己喜欢的游戏! 91里就应该有吧 这位朋友您好你在泡椒网安卓论坛上下载

一般手游源代码哪里有卖

一般来说,你可以在网上的开发者商店或游戏平台上购买手机游戏的源代码。如果你想在线下购买,你可以到当地的开发者交流会和开发者大会上购买源代码,也可以找到一些自由软件开发者来提供源代码。

谁能给我一个手机游戏的源代码啊

这个地址也有,不过直接给你吧,这样比较好

先给你看看主要的类吧

package Game;

import DreamBubbleMidlet;

import java.io.IOException;

import java.util.Enumeration;

import java.util.Hashtable;

import javax.microedition.lcdui.Graphics;

import javax.microedition.lcdui.Image;

import javax.microedition.lcdui.game.GameCanvas;

import javax.microedition.lcdui.game.LayerManager;

import javax.microedition.lcdui.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.lcdui.Image;

import javax.microedition.lcdui.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

看不明白的可以随时来问我哦,还可以当时传给你撒

手游源码是什么

游戏源代码就是游戏的基础,在外行人眼里是无数行的英文和数字,其实就是一组程序。

作用当然是开发游戏啦。

手上拥有了源代码就可以制作游戏,当然如果你啥都不改,那功能就和原来的游戏没什么两样。

现在网上你可以搜索一下网络游戏的源代码还是非常多的,但是大多数都是不完整的,也就是说你即便得到了也无法用。

就算你拿到了源代码,你也要有完整的美术资源,需要让程序贴图替换上去,达到视觉上不一样的效果。世界背景和故事都要换,所有这些的成本当然不是一般的高。

最后是运营,运营的成本就更高了。

求:手机软件源代码!

其实这里有很多的:

[gnokii-0.3.2.tar.gz]

Nokia手机工具程序。可以管理手机的电话薄,发送/接收短消息,查看电池状态等 (2001-02-14, UNIX, 731KB, 2130次)

[smslink-0.44b.tar.gz]

手机短消息服务的服务器和客户端 (2001-01-08, LINUX, 91KB, 1883次)

[移动短信SMS综合资料库.rar]

短消息基础知识;短消息的信息处理流程及其分析、解决问题的方法;手机短信息SMS开发—编码,解码;PDU介绍;短消息的体系结构等 (2005-09-28, CHM, 1009KB, 1536次)

[nle-0.0.1-2.tgz]

可以修改Nokia手机的logo图标的程序 (2001-02-14, LINUX, 21KB, 1442次)

[是男人就下一百层SHY.rar]

制作的第一款休闲类的手机游戏,适合初学者参考 (2005-06-15, Java, 484KB, 1357次)

[sms_client-2.0.7k.tgz]

使用TAP的蜂窝型GSM手机短消息服务中心 (2001-01-08, LINUX, 82KB, 1333次)

[mobile_sms.zip]

使用手机发送短消息的编程方法 (2001-11-21, HTML, 5KB, 1174次)

[kvanttisms-src-0.5.tgz]

Java写的通过手机收发短信息的程序。 (2001-11-20, Java, 10KB, 1049次)

[BREW开发-海信(王宏兵).rar]

深入研究BREW手机游戏开发———— 王洪信开发者最好的初学资料 (2005-09-26, Visual C++, 7229KB, 841次)

[jSMSEngine_2_0_4.zip]

开源的手机短信开发包!包括例子程序和比较详细的文档,还有开发者的网站!来源于sourceforge! (2006-01-21, Java, 438KB, 729次)

[qrcode_js.zip]

手机内嵌二维条码图像识别的JAVA的源程序,强烈推荐下载。 (2006-01-14, Java, 2210KB, 677次)

[gprs_sms.zip]

一个用COM或USB接口连接gsm/gprs手机进行短信收发的程序,用到的是simense的通讯模块 (2003-02-20, Visual C++, 97KB, 629次)

[PaoPao.rar]

j2me手机泡泡龙游戏。写得不错还未完工的版本。不过可以用来学习。 (2005-03-04, Java, 83KB, 613次)

[MakeMap.rar]

用java写的地图编辑器,可用于j2me手机游戏的地图编辑。 (2005-03-04, Java, 26KB, 606次)

[J2mebox.rar]

一个类似打地鼠的j2me手机游戏。 (2005-03-04, Java, 58KB, 521次)

[shoujihaomachaxun.rar]

输入手机号码可查询:归属地址、手机号码、区号、所属卡型 (2006-06-05, Java, 686KB, 520次)

[rich_man+src.rar]

大富翁手机游戏。 (2005-03-04, Java, 269KB, 513次)

[gsmssend-1.6.tar.gz]

通过网站发送手机短信息的程序。需要GNOME/GTK支持 (2001-11-20, LINUX, 352KB, 498次)

[MTKstart.rar]

台湾联发(MTK)手机芯片资料,可作为手机应用的平台 (2007-08-09, C-C++, 118KB, 495次)

[C# 发短信.rar]

使用C#发短信,连接Modem或者手机,通过串口发送短信, (2004-06-30, CSharp, 437KB, 469次)

[WindowsMobile5.0.rar]

Windows Mobile 5.0 三十几个经典手机软件开发源码希望对大家有帮助. (2006-08-30, CSharp, 578KB, 449次)

[motorola_RingerToneFormat.zip]

motorola手机铃声格式文档 (2002-06-07, PDF, 45KB, 445次)

[ksiemens-0.1.tar.gz]

KDE下的西门子手机管理程序,如图标,电话薄,短信息等管理 (2001-11-21, LINUX, 3437KB, 444次)

[nec麻将.rar]

一个java编的小游戏.对初学手机游戏编程的人很有用啊. (2005-06-07, Java, 50KB, 434次)

[nokiacomposer.src.zip]

Nokia手机语音管理程序,如上载音乐等。 (2001-11-21, Visual C++, 315KB, 422次)

[SmartMessagingFAQ.zip]

诺基亚手机图片铃声开发文档 (2002-06-07, PDF, 23KB, 410次)

[motolora_smscertguide.zip]

motorola手机短信息开发文档 (2002-06-07, PDF, 134KB, 400次)

[MV100-0.1.rar]

是一个手机功能的模拟程序,从界面到功能都做了很好的模拟 (2005-07-29, C-C++, 14630KB, 384次)

[helix.src.0812.rar]

著名的 helix realplayer 基于手机 symbian 系统的 播放器全套源代码,内含编译工具、以及配套相关软件:WinCVS、Python等。花了近一个多月才整理完成,是非常难得的全套代码。 (2005-05-19, C++, 43787KB, 373次)

[eluosi方块.rar]

经典的手机游戏源码俄罗斯方块,基于C+Brew开发 (2005-07-14, C-C++, 425KB, 373次)

[MTK2.rar]

这是我上传MTK手机开发的一些资料2,这两天起上传6份资料,全部是手开发的。希望对你们有用。 (2007-04-13, C-C++, 5859KB, 371次)

[resource]

压缩包中一个为一般操作系统下的fft,一个是手机或类似设备中的T9拼音输入法 (2003-08-05, C-C++, 53KB, 359次)

[SeaHorse.rar]

手机游戏,画面效果还可以,可以作为手机游戏入门参考 (2005-06-15, Java, 273KB, 356次)

[nec 打飞机.rar]

一个JAVA编的小游戏,对初学手机游戏的人很有帮助. (2005-06-07, Java, 73KB, 335次)

[多级菜单.rar]

/*[原创]一个树形多级菜单参考程序 这是一个用于车载电话的菜单程序,可以看成是手机功能菜单的简化板. 我所认为的树形多级菜单是指:在一个父菜单项目下面有多个子菜单, 子菜单下面又有多个孙菜单...,进入下层菜单主要依*当前选中的索引.有点象文件的目录结构. 本木从前实现这类的菜单主要*分层的switch语句,每层都是一个switch.但当我看到晓奇大侠的 程序和耳朵灌满lq等人的争论后,那时那地,我的心境变化了,我意识到指针代表了先进的生产力, 代表了社会的发展方向,是建设和谐社会的必要条件.不管你用了多长时间C语言,只要你不善于用 一个小针指来指去,你就是那种"用嘴吃饭的高贵骑士,决不用屁股装弹步枪"的守旧分子和社会发 展的绊脚石.(跑题太远,删去1万字...打住) .言归正传,下面的程序适用CPU为Mega16,编译器为CVAVR 1.24.4a 由于按键数目较多,所以按键程 序把按键事件分为数字键,快捷键,确认键,取消键,上下翻键几类,以减小菜单结构的容量.一下菜单 数据在菜单结构数组中的偏移量,有多少个菜单象就有多少个宏定义*/ (2005-08-02, C-C++, 2KB, 334次)

[与小灵通讯的软件.zip]

手机的通讯,特别是小灵通的通讯,是非常难得的技术,也是很受欢迎的,快下啊! (2005-09-30, Visual C++, 39KB, 324次)

[C16汉字输入方案.rar]

“C16汉字输入方案”,是针对小键盘设备(如手机、遥控器等)通常为16个基本键(“0”到“9”、“*”、“#”、左右键、删除键、确认键)的情况,充分发掘16个键位条件下进行汉字输入和符号输入的潜力,使汉字、英文、数字输入达到尽可能高的效率,是在16键的小键盘设备进行汉字输入的优秀方案。 (2005-10-27, C++ Builder, 76KB, 316次)

[CDMA短消息发送程序.zip]

用vc开发的cdma手机模块收发短信的功能,主要部分是串口通信和gb-unicode码间的转换。 (2005-12-08, Visual C++, 193KB, 313次)

开发手游的代码

4.1游戏的的思路、构想

4.1.1游戏想法的产生

相信大家一定都在8位机机上玩过《冒险岛》这款游戏,非常有趣味性。

游戏中玩家通过不断的闯关,来解救公主。在每个关都很很多的怪物阻挡着你,所以需要运用各种机关或者秘籍来杀死它们。杀死他们的同时还可以获得各种奖励,加生命,加血等,增加了游戏的趣味性。

如图2所示:

这款《冒险岛》游戏的实现相对于其他RPG或者网络版手机游戏稍简单一些,适合初学者作为练习,所以我决定编写一款类似的手机游戏。

由于之前对手机游戏的编程知识以及游戏的设计只有初步的了解,因此,我们在游戏的构架和思路上经历了几个阶段。

这款《冒险岛》游戏的实现相对于其他RPG或者网络版手机游戏稍简单一些,适合初学者作为练习,所以我决定编写一款类似的手机游戏。

由于之前对手机游戏的编程知识以及游戏的设计只有初步的了解,因此,我们在游戏的构架和思路上经历了几个阶段。

4.1.2对游戏设计的初步认识

刚开始我们只对J2ME有初步的了解。这时我们只是模仿之前在PC上看到的游戏,用语言把游戏的实现感性的描述为几大部分:

游戏界面系统:包括游戏开始界面;游戏开局界面;游戏运行界面;游戏结束界面。

游戏元素:菜单类;画布类;人物类;排行榜类。

4.1.3模块成型阶段

在进一步熟悉了J2ME知识后,对框架做出了一些修改,逐步把游戏的基本功能确定。游戏依次进入加载界面;主菜单;游戏运行界面;游戏结束界面。

具体实现的功能为:

1.主菜单,有如下选项:

(1)开始游戏——进入游戏界面。

(2)声音——设置声音的有无选项。

(3)帮助——介绍游戏的玩法。

(4)排行榜——玩家所得分数的排行榜。

(5)关于——用来显示说明信息以及背景图片。

2.游戏运行界面,包括:

游戏界面;目前游戏得分;游戏关数;生命次数;

3.游戏结束界面:游戏结束后,显示一行说明信息,然后退回到菜单。

游戏的主要模块为:

1.游戏主MIDlet(GameMIDlet)——对游戏生命周期的判断;对画布类的调用;管理游戏程序中各个屏幕之间的转换。

2.游戏画布(MyGame)——对游戏所用变量,常量的设定;游戏的初始化;游戏中精灵运动轨迹的控制;精灵与砖块的碰撞检测以及砖块状态的控制;游戏中各关卡的基本设定;游戏中对按键状态的处理。

3.菜单类——游戏中菜单事件的处理。

4.GameOgre类——游戏中怪物的类。

5.GamePlayer类——玩家控制的精灵类。

6.GameRMS类——用于实现分数排行榜。

7.PlayMusic类——用于实现音乐的播放。

8.MySet类——声音大小的设置。

4.2 程序的类结构

程序一共有8个主要类,其中菜单类负责各个屏幕的切换。程序的类结构如图3所示:

4.3 游戏的流程图

进入游戏菜单。初始情况下,游戏菜单有5个选项,它们分别是开始游戏、游戏说明和排行榜、设置、关于。选择开始新游戏则进入游戏,在游戏中如果按下非游戏键则中断游戏返回菜单,此时菜单中增加了一个继续游戏的选项,可以返回游戏也可以重新开始新的游戏。在菜单中选择游戏说明或者高分记录,则进入相应的屏幕,他们都能用“后退”软键返回菜单。菜单中的退出选项用于退出程序。游戏的流程如图4所示:

4.4.1主类GameMIDlet的实现

MIDlet是最核心的类。MIDlet程序有三种状态:

1.暂停状态

2.运行状态

3.销毁状态

J2ME程序都是从MIDlet类开始执行,系统在执行MIDlet程序时,首先构造一个MIDlet类型的对象,然后使程序进入到暂停状态,按照生命周期的规定,系统会自动调用MIDlet对象的startApp方法使程序进入到运行状态,开始程序的执行。

下图是运行时显示的画布对象:

首先,先要创建MIDlet类型的对象,下面我们来看对象的构造方法:

//主程序构造方法

public GameMIDlet()

{

rs = null;

RecordName = “GameRMS”;

GameMenu.display = Display.getDisplay(this) ;

GameMenu.midlet = this;

}

java

开发语言

oppo手机型号及价格

精选推荐

广告

JAVA基于J2ME的手机游戏开发(文档+源代码).zip

0下载·0评论

2022年1月27日

JAVA基于J2ME的手机游戏开发免费

717阅读·0评论·0点赞

2022年8月23日

JAVA五子棋手机网络对战游戏的设计与实现(源代码+论文)

568阅读·2评论·0点赞

2022年12月5日

J2ME手机游戏引擎程序结构简述

170阅读·0评论·0点赞

2021年9月12日

最新45款Java手机游戏开发源代码免费下载

10下载·0评论

2019年3月4日

经典50个Java手机游戏源码.7z

3下载·0评论

2022年7月8日

无敌版游戏下载

精选推荐

广告

java手机小游戏源码_Java手机版数独小游戏(J2me)JAVA游戏源码下载

435阅读·0评论·0点赞

2021年3月14日

java 300行代码 冒险闯关小游戏(代码+讲解)

2637阅读·1评论·6点赞

2022年9月9日

java俄罗斯方块代码_【俄罗斯方块java】分享一个Java写的俄罗斯方块源码 算法简单(300行) 注释详细!...

304阅读·0评论·0点赞

2021年3月5日

java小游戏源码_分享几款java小游戏源码

4921阅读·0评论·4点赞

2021年3月5日

java手机游戏开发如何_用JAVA开发手机游戏需要如何构建开发环境?

1209阅读·0评论·0点赞

2021年2月26日

《精通Java手机游戏与应用程序设计》源码

35阅读·0评论·0点赞

2022年3月24日

java怎么制作游戏,看完这篇彻底明白了

4803阅读·0评论·2点赞

2021年6月29日

泡泡堂代码 JAVA_Java手机游戏泡泡堂源码

566阅读·0评论·1点赞

2021年3月14日

十款经典游戏的Java版本(开源)

19.0W阅读·95评论·214点赞

2014年12月7日

飞翔的小鸟--Java小游戏实战(代码完整)

1.1W阅读·13评论·50点赞

2021年4月5日

Vue——获取后端json数据中的URL并通过按钮跳转到此URL

1683阅读·4评论·0点赞

2021年2月5日

java安卓游戏源码下载_77个安卓游戏 android源码

801阅读·0评论·0点赞

2021年3月15日

去首页

看看更多热门内容

源码资源网手游的介绍就聊到这里吧,感谢你花时间阅读本站内容,更多关于正版源码网、源码资源网手游的信息别忘了在本站进行查找喔。


【免责声明】:

本站所发布的一切资源仅限用于学习和研究目的;不得将上述内容用于商业或者非法用途,否则,一切后果请用户自负。本站信息来自网络,版权争议与本站无关。您必须在下载后的24个小时之内,从您的电脑中彻底删除上述内容。如果您喜欢该程序,请支持正版软件,购买注册,得到更好的正版服务。

【关于转载】:

本站尊重互联网版权体系,本站部分图片、文章大部分转载于互联网、所有内容不代表本站观点、不对文章中的任何观点负责、转载的目的只用于给网民提供信息阅读,无任何商业用途,所有内容版权归原作者所有
如本站(文章、内容、图片、视频)任何资料有侵权,先说声抱歉;麻烦您请联系请后台提交工单,我们会立即删除、维护您的权益。非常感谢您的理解。

【附】:

二○○二年一月一日《计算机软件保护条例》第十七条规定:为了学习和研究软件内含的设计思想和原理,通过安装、显示、传输或者存储软件等方式使用软件的,可以不经软件著作权人许可,不向其支付报酬!鉴于此,也希望大家按此说明研究软件!

注:本站资源来自网络转载,版权归原作者和公司所有,如果有侵犯到您的权益,请第一时间联系我们处理!

-----------------------------------------------------------------------------------------------------------

【版权声明】:

一、本站致力于为源码爱好者提供国内外软件开发技术和软件共享,着力为用户提供优资资源。
二、本站提供的源码下载文件为网络共享资源,请于下载后的24小时内删除。如需体验更多乐趣,还请支持正版。
三、如有内容侵犯您的版权或其他利益的,请编辑邮件并加以说明发送到站长邮箱。站长会进行审查之后,情况属实的会在三个工作日内为您删除。
-----------------------------------------------------------------------------------------------------------


内容投诉
源码村资源网 » 源码资源网手游(正版源码网)
您需要 登录账户 后才能发表评论

发表评论

欢迎 访客 发表评论