- 浏览: 626151 次
- 性别:
- 来自: 广州
文章分类
- 全部博客 (448)
- 字符串相关 (16)
- Struts2页面显示 (15)
- Hibernate错误记录 (6)
- linux命令 (2)
- java项目测试 (5)
- 个人作品 (10)
- hibernate应用 (15)
- struts1 (7)
- 数据库(除了hibernate) (42)
- J2ME/WAP (37)
- servlet/jsp (49)
- java桌面应用+java综合 (14)
- 服务器配置,报错解决 (24)
- Myeclipse配置,抛错解决 (8)
- linux (18)
- JavaScript+jquery+ajax (45)
- div css 页面设计 (16)
- 互联网综合运营 (14)
- 编程工具类 (3)
- 论文 报告 文献 (14)
- PHP (26)
- struts2 (9)
- spring (1)
- 我的IT生活 (14)
- Resin (6)
- java项目记录 (14)
- https安全 (11)
- 支付技术 (3)
最新评论
-
yihaijunyxr:
很好呀,我好久没用iteye了,今天找出两个帐号(yihaij ...
c/c++的监听tmlisten启动缓慢解决 -
yihaijun:
好像这不算是技术博客,是工作博客
c/c++的监听tmlisten启动缓慢解决 -
ml365:
后来还优化了webservice的前置框架,不用cxf,用了另 ...
c/c++的监听tmlisten启动缓慢解决 -
Jayliuying:
有点晚哈 但是也支持一下 楼主
java相关论文的参考文献【转】 -
gqsunrise:
...
我是项目经理,我的项目管理日记【20120229】
J2ME RPG游戏边学边做(二)
1、
public void moveDown() throws IOException
{
//英雄下移,并改为相应的图片
setImage(Image.createImage("/hero_down.png"), 17, 26);
nextFrame();
this.y = Math.min(braveCanvas.getHeight(), y + 1);
}
在io包中的读取是非常耗内存的,所以Image.createImage("/hero_down.png")放在线程的循环中确实不好,现在已经改成图象在BraveCanvas类中创建(下面的代码已更改),然后由moveDown(Image image)方法接收传递进来的图象。
2、RPG是个大工程,一个人的力量是很难完成的,我只想实现基本的RPG功能,比如人物的对话,场景的转换,战斗等等,希望大家多多给予帮助。
这一篇我将给游戏加入地图,以下是该篇所需要的图片:
background.png
foreground.png
一个RPG中的游戏地图是非常大而且多的,为了方便以后的维护,我创建了一个Scene类,该类主要是产生游戏所需要的地图。
Scene.java
package brave;
import javax.microedition.lcdui.game.TiledLayer;
import javax.microedition.lcdui.Image;
public class Scene
{
public static TiledLayer createTiledLayerByBackground(Image image)
{
//使用TiledLayer创建地图
TiledLayer tiledLayer = new TiledLayer(10, 8, image, 48, 64);
tiledLayer.fillCells(0, 0, 10, 8, 2);
return tiledLayer;
}
}
修改BraveCanvas类,加入地图
BraveCanvas.java
package brave;
import javax.microedition.lcdui.game.GameCanvas;
import javax.microedition.lcdui.Graphics;
import java.io.IOException;
import javax.microedition.lcdui.Image;
import javax.microedition.lcdui.game.TiledLayer;
public class BraveCanvas extends GameCanvas implements Runnable
{
private boolean sign;
private Graphics g;
private Hero hero;
private Image upimage;
private Image downimage;
private Image leftimage;
private Image rightimage;
private TiledLayer backgroundMap;
public BraveCanvas()
{
super(true);
}
public void startup()
{
this.sign = true;
try
{
//产生地图
backgroundMap = Scene.createTiledLayerByBackground(
Image.createImage("/background.png"));
//改正上一篇的错误
upimage = Image.createImage("/hero_up.png");
downimage = Image.createImage("/hero_down.png");
leftimage = Image.createImage("/hero_left.png");
rightimage = Image.createImage("/hero_right.png");
hero = new Hero(upimage, 17, 26);
hero.setFrameSequence(new int[]{1, 1, 0, 0, 1, 1, 2, 2});
hero.setBraveCanvas(this);
hero.init(40,40);
}
catch(Exception e)
{
e.printStackTrace();
}
Thread thread = new Thread(this);
thread.start();
}
public void run()
{
g = getGraphics();
while(sign)
{
try
{
input(g);
paint(g);
Thread.sleep(15);
}
catch(Exception e)
{
e.printStackTrace();
}
}
}
public void input(Graphics g) throws IOException
{
int keystates = getKeyStates();
switch(keystates)
{
case UP_PRESSED:
//由这里传入需要改变的图片
hero.moveUp(upimage);
break;
case DOWN_PRESSED:
hero.moveDown(downimage);
break;
case LEFT_PRESSED:
hero.moveLeft(leftimage);
break;
case RIGHT_PRESSED:
hero.moveRight(rightimage);
break;
}
hero.afresh();
}
public void paint(Graphics g)
{
g.setColor(0x000000);
g.fillRect(0, 0, getWidth(), getHeight());
g.setColor(0xffffff);
//显示地图
backgroundMap.paint(g);
hero.paint(g);
flushGraphics();
}
}
现在我们的英雄虽然能在草地上行走了,但感觉给他移动的空间太小了。而且我们在创建背景地图的时候,地图大小明明是512*480的。好,接下来我们要做的就是让英雄可以在更大的天地中活动。这里就需要一个BraveManager类来管理这些屏幕上的Sprite和TiledLayer,该类继承 LayerManager。
BraveManager.java
package brave;
import javax.microedition.lcdui.game.LayerManager;
public class BraveManager extends LayerManager
{
private BraveCanvas braveCanvas;
public void setBraveCanvas(BraveCanvas braveCanvas)
{
this.braveCanvas = braveCanvas;
}
public void afresh()
{
//确定当前试图的坐标
//这里用一个比较简单的算法来使英雄永远在屏幕的中央
int viewX = Math.max(0, getLayerAt(0).getX() - braveCanvas.getWidth()/2);
int viewY = Math.max(0, getLayerAt(0).getY() - braveCanvas.getHeight()/2);
viewX = Math.min(viewX, getLayerAt(1).getWidth() - braveCanvas.getWidth());
viewY = Math.min(viewY, getLayerAt(1).getHeight() - braveCanvas.getHeight());
setViewWindow(viewX, viewY, braveCanvas.getWidth(), braveCanvas.getHeight());
}
}
修改BraveCanvas类
BraveCanvas.java
package brave;
import javax.microedition.lcdui.game.GameCanvas;
import javax.microedition.lcdui.Graphics;
import java.io.IOException;
import javax.microedition.lcdui.Image;
import javax.microedition.lcdui.game.TiledLayer;
public class BraveCanvas extends GameCanvas implements Runnable
{
private boolean sign;
private Graphics g;
private Hero hero;
private Image upimage;
private Image downimage;
private Image leftimage;
private Image rightimage;
private TiledLayer backgroundMap;
//创建Layer管理视图类
private BraveManager braveManager;
public BraveCanvas()
{
super(true);
}
public void startup()
{
this.sign = true;
try
{
backgroundMap = Scene.createTiledLayerByBackground(
Image.createImage("/background.png"));
upimage = Image.createImage("/hero_up.png");
downimage = Image.createImage("/hero_down.png");
leftimage = Image.createImage("/hero_left.png");
rightimage = Image.createImage("/hero_right.png");
//创建Layer管理视图类
braveManager = new BraveManager();
braveManager.setBraveCanvas(this);
hero = new Hero(upimage, 17, 26);
hero.setFrameSequence(new int[]{1, 1, 0, 0, 1, 1, 2, 2});
hero.setBraveCanvas(this);
hero.setBraveManager(braveManager);
hero.init(0,0);
}
catch(Exception e)
{
e.printStackTrace();
}
Thread thread = new Thread(this);
thread.start();
}
public void run()
{
g = getGraphics();
//插入图层
braveManager.insert(hero, 0);
braveManager.insert(backgroundMap, 1);
while(sign)
{
try
{
input(g);
paint(g);
Thread.sleep(15);
}
catch(Exception e)
{
e.printStackTrace();
}
}
}
public void input(Graphics g) throws IOException
{
int keystates = getKeyStates();
switch(keystates)
{
case UP_PRESSED:
hero.moveUp(upimage);
break;
case DOWN_PRESSED:
hero.moveDown(downimage);
break;
case LEFT_PRESSED:
hero.moveLeft(leftimage);
break;
case RIGHT_PRESSED:
hero.moveRight(rightimage);
break;
}
hero.afresh();
//刷新视图的位置
braveManager.afresh();
}
public void paint(Graphics g)
{
g.setColor(0x000000);
g.fillRect(0, 0, getWidth(), getHeight());
g.setColor(0xffffff);
//显示视图
braveManager.paint(g, 0, 0);
flushGraphics();
}
}
这样英雄就可以在地图上任何地方行动了,不过还得改一个小地方:不知道大家还记的不,在Hero类中,我们定义英雄移动的范围最大为屏幕的尺寸。
这显然是不行的,最大的移动范围应改成地图的大小:
this.x = Math.min(braveManager.getLayerAt(1).getWidth(), x + 1);
代码如下:
Hero.java
package brave;
import javax.microedition.lcdui.game.Sprite;
import javax.microedition.lcdui.Image;
import java.io.IOException;
import javax.microedition.lcdui.Graphics;
public class Hero extends Sprite
{
private int x;
private int y;
private BraveCanvas braveCanvas;
private BraveManager braveManager;
public Hero(Image image, int frameWidth, int frameHeight)
{
super(image, frameWidth, frameHeight);
}
public void setBraveCanvas(BraveCanvas braveCanvas)
{
this.braveCanvas = braveCanvas;
}
public void setBraveManager(BraveManager braveManager)
{
this.braveManager = braveManager;
}
public void setManager(BraveCanvas braveCanvas)
{
this.braveCanvas = braveCanvas;
}
public void init(int x, int y)
{
this.x = x;
this.y = y;
}
public void afresh()
{
setPosition(this.x, this.y);
}
public void moveUp(Image image) throws IOException
{
setImage(image, 17, 26);
nextFrame();
this.y = Math.max(0, y - 1);
}
public void moveDown(Image image) throws IOException
{
setImage(image, 17, 26);
nextFrame();
this.y = Math.min(braveManager.getLayerAt(1).getHeight(), y + 1);
}
public void moveLeft(Image image) throws IOException
{
setImage(image, 17, 26);
nextFrame();
this.x = Math.max(0, x - 1);
}
public void moveRight(Image image) throws IOException
{
setImage(image, 17, 26);
nextFrame();
this.x = Math.min(braveManager.getLayerAt(1).getWidth(), x + 1);
}
}
现在英雄的移动范围大了,但只英雄一人,也太孤单了,我们给他创造一个小镇吧。
修改Scene类如下:
Scene.java
package brave;
import javax.microedition.lcdui.game.TiledLayer;
import javax.microedition.lcdui.Image;
public class Scene
{
public static TiledLayer createTiledLayerByBackground(Image image)
{
TiledLayer tiledLayer = new TiledLayer(10, 8, image, 48, 64);
tiledLayer.fillCells(0, 0, 10, 8, 2);
return tiledLayer;
}
public static TiledLayer createTiledLayerByForeground(Image image)
{
TiledLayer tiledLayer = new TiledLayer(30, 32, image, 16, 16);
// 30 * 32
int[] maplist =
{
//0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
26 27 28 29
0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0
,0 ,0 ,0 ,0 ,0 ,//0
0
,28,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,
30,0 ,//1
0 ,34,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0
,0 ,0 ,0 ,36,0 ,//2
0 ,34,0 ,1 ,2 ,3 ,4 ,5 ,0 ,0 ,0 ,1 ,2 ,3 ,3 ,26,3 ,3 ,4 ,5 ,0 ,0 ,1 ,2 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,//25
0 ,34,0 ,0 ,0 ,12,0 ,0 ,0 ,12,18,0 ,0 ,0 ,0 ,12,0 ,0 ,0 ,0 ,12,0 ,0 ,0
,12,0 ,0 ,0 ,36,0 ,//26
0 ,34,0 ,0 ,0
,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,0 ,0 ,0 ,36,0 ,//27
0 ,34,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,12,12,12,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0
,0 ,0 ,0 ,36,0 ,//28
0 ,34,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,12,12,12,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0
,0 ,0 ,0 ,36,0 ,//29
0
,40,29,29,29,29,29,29,29,29,29,29,29,29,12,12,12,29,29,29,29,29,29,29,29,29,29,29,
42,0 ,
//30
0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0
,0 ,0 ,0 ,0 ,0 //31
};
for(int i = 0 ; i < maplist.length ; i++)
{
int col = i % 30;
int row = (i - col) / 30;
tiledLayer.setCell(col, row, maplist[i]);
}
return tiledLayer;
}
}
修改BraveCanvas类如下:
BraveCanvas.java
package brave;
import javax.microedition.lcdui.game.GameCanvas;
import javax.microedition.lcdui.Graphics;
import java.io.IOException;
import javax.microedition.lcdui.Image;
import javax.microedition.lcdui.game.TiledLayer;
public class BraveCanvas extends GameCanvas implements Runnable
{
private boolean sign;
private Graphics g;
private Hero hero;
private Image upimage;
private Image downimage;
private Image leftimage;
private Image rightimage;
private TiledLayer backgroundMap;
private TiledLayer foregroundMap;
private BraveManager braveManager;
public BraveCanvas()
{
super(true);
}
public void startup()
{
this.sign = true;
try
{
backgroundMap = Scene.createTiledLayerByBackground(
Image.createImage("/background.png"));
//生成小镇地图
foregroundMap = Scene.createTiledLayerByForeground(
Image.createImage("/foreground.png"));
upimage = Image.createImage("/hero_up.png");
downimage = Image.createImage("/hero_down.png");
leftimage = Image.createImage("/hero_left.png");
rightimage = Image.createImage("/hero_right.png");
braveManager = new BraveManager();
braveManager.setBraveCanvas(this);
hero = new Hero(upimage, 17, 26);
hero.setFrameSequence(new int[]{1, 1, 0, 0, 1, 1, 2, 2});
hero.setBraveCanvas(this);
hero.setBraveManager(braveManager);
hero.init(0,0);
}
catch(Exception e)
{
e.printStackTrace();
}
Thread thread = new Thread(this);
thread.start();
}
public void run()
{
g = getGraphics();
braveManager.insert(hero, 0);
//插入小镇地图
braveManager.insert(foregroundMap, 1);
braveManager.insert(backgroundMap, 2);
while(sign)
{
try
{
input(g);
paint(g);
Thread.sleep(15);
}
catch(Exception e)
{
e.printStackTrace();
}
}
}
public void input(Graphics g) throws IOException
{
int keystates = getKeyStates();
switch(keystates)
{
case UP_PRESSED:
hero.moveUp(upimage);
break;
case DOWN_PRESSED:
hero.moveDown(downimage);
break;
case LEFT_PRESSED:
hero.moveLeft(leftimage);
break;
case RIGHT_PRESSED:
hero.moveRight(rightimage);
break;
}
hero.afresh();
braveManager.afresh();
}
public void paint(Graphics g)
{
g.setColor(0x000000);
g.fillRect(0, 0, getWidth(), getHeight());
g.setColor(0xffffff);
braveManager.paint(g, 0, 0);
flushGraphics();
}
}
运行结果如图:
发表评论
-
什么是WAP网关?
2011-10-17 17:09 10151. 什么是WAP网关? WA ... -
判断用户通过手机访问wap还是电脑直接访问
2011-10-17 16:29 1989首先说最根本的解决 ... -
wap的全面解析!!
2011-10-17 16:29 18121. 开发WAP软件需要哪 ... -
j2me library failed to get library information[转]
2010-12-11 21:59 1167出現過類似問題,我是每次都用的run as...->ru ... -
j2me联网时候对于代理问题可能会出现的错误【转】
2010-12-11 11:30 775众所周知,CMWAP是一个网关,同时又是一个代理服务器,我 ... -
在无线J2ME设备上实现超文本传输协议【转】
2010-12-11 11:27 758随着越来越多手提电 ... -
J2ME使用Socket通过cmwap接入点访问安全HTTPS 2【转】
2010-12-11 11:26 1260新建一个Midp应用程序,在startApp中加入以下代码: ... -
J2ME使用Socket通过cmwap接入点访问安全HTTPS1 【转】
2010-12-11 11:25 1401这个问题是在我升级J2ME版XHTML浏览器的时候被引入的,我 ... -
J2ME无线联网技术中的HTTP连接[转]
2010-12-11 11:24 862import java.io.ByteArrayOutputS ... -
wml教程 中文手册
2010-12-11 01:02 903http://www.g168.net/txt/wml/ ... -
j2me结合j2ee实现用户登陆功能-2【转】
2010-12-11 00:41 948服务器代码:LoginServlet:package co ... -
j2me结合j2ee实现用户登陆功能【转】
2010-12-11 00:40 847手机客户端代码:LoginForm:package com ... -
独立WAP交友网站趋势分析
2010-12-10 19:28 975从互联网开始,交友网 ... -
什么是WAP?wap技术简介(转)
2010-12-10 19:25 975程序员都在讨论Wireless(无线)技术,也就是常说到的WA ... -
j2me游戏开发:控制飞机移动(转)
2010-12-10 19:01 9121. 飞机plane是一个标准的plane。由三桢画面组成,: ... -
j2me游戏开发:工具类的完善(转)
2010-12-10 19:00 934虽然我们有了midp2.0的支持,但是有时还是需要一些辅助工具 ... -
J2ME程序教程,程序+讲解,很好的入门教程(转载) 【1】
2010-12-10 18:58 1120J2ME RPG游戏边学边做(一) 笔者以前是做j2ee的 ... -
J2ME内存优化(转载)
2010-12-10 18:58 873Out momory 一阵天旋地转 ... -
PngMate使用教程2(转)
2010-12-10 18:57 863下面我们来换一张图片,街头霸王Ken,这张gif的帧数比较多, ... -
PngMate使用教程1(转)
2010-12-10 18:56 1311PngMate使用教程 JAVA手机网[www.cnjm.n ...
相关推荐
**J2ME(Java 2 Micro Edition)**是Java平台的一个子集,主要设计用于嵌入式设备和移动设备上的应用程序开发。这个平台允许开发者创建能在功能手机、智能手表、家用电器等小型设备上运行的应用。J2ME教程是学习这一...
尽管本教程内容涉及初学阶段,但本教程不仅仅是一本入门的读物,很多的内容的详细程度对于有经验的开发者来说,也是很多脾益的。事实上,本教程假定初学者已经有了一定的JAVA语言基础。 读者可以快速的从这里...
**J2ME编程详解** Java 2 Micro Edition(J2ME)是Java平台的一个子集,主要用于嵌入式设备和移动设备的开发,如手机、智能手表...记得在阅读过程中结合实际操作,理论与实践相结合,这样可以更好地掌握J2ME编程技能。
标题中的“netBeans J2ME PDA 手机 编程入门”指的是使用...压缩包内的“J2ME无线设备程序设计.pdf”很可能是该教程的详细指南,包含了以上各个知识点的深入讲解。阅读并实践其中的内容,将有助于全面理解J2ME编程。
很好的入门材料,里面有具体实例,详细讲解,真的不错!!
总之,《J2ME手机游戏开发技术详解》是一本全面的指南,涵盖了从入门到高级的J2ME游戏开发技术,对于那些想踏入移动游戏开发领域的人来说,是一本不可多得的参考资料。尽管现在J2ME在智能机市场已被其他平台取代,但...
对于希望从其他语言或平台转向J2ME游戏开发的经验丰富的游戏开发者来说,本书也是一个很好的入门资料。 - **适用场景:** 本书适用于希望快速了解如何使用J2ME进行移动游戏开发的专业人士,同时也可用作移动游戏...
这是一个很好的起点,可以帮助开发者建立起对J2ME游戏开发的基本认识,并为进一步的移动游戏开发打下基础。 总的来说,J2ME手机游戏贪吃蛇小游戏是一个实用的学习案例,它涵盖了移动游戏开发的基础知识,包括线程...
Java手机程式设计入门是针对初学者的一份教程资源,主要关注的是J2ME(Java 2 Micro Edition)技术,这是Java平台的一个子集,用于开发和部署在移动设备、嵌入式系统等上的应用程序。本教程以繁体字编写,但内容深度...
【Android 学习资源概述】 本资源集合包含了丰富的Android开发学习视频教程,涵盖了从入门到高级,从基础理论到实战项目的各个层面。...同时,很多教程还附带源码,有助于学习者更好地理解和实践所学知识。
对于希望从事Web开发的人来说,《Java Server Pages》是一本很好的入门书籍,而对于希望了解EJB的企业级开发者,《Enterprise JavaBeans, 2nd Edition》则是非常实用的选择。通过这些书籍的学习,结合实践操作,将有...
这份手册系统地介绍了Java编程从入门到高级的所有知识点,对于自学Java的读者来说是一本很好的参考资料。 #### 二十二、JAVA学生管理系统 这是一个基于Java的学生管理系统项目,包含了学生信息管理、成绩管理等...
前言: 在我们学习Java的过程中,掌握其中的基本概念对我们的学习无论是J2SE,J2EE,J2ME都是很重要的,J2SE是Java的基础,所以有必要对其中的基本概念做以归纳,以便大家在以后的学习过程中更好的理解java的精髓,在此我...
2. **面向对象编程(OOP)**:深入讲解面向对象编程的核心原则,如封装、继承和多态性,并展示了如何在实际项目中应用这些概念来构建灵活且可扩展的代码。 3. **标准模板库(STL)**:这是本书的重点章节之一。作者详细...
1. **多层架构**:Java 2平台被划分为三个版本:J2SE(Java 2 Standard Edition)用于桌面应用,J2EE(Java 2 Enterprise Edition)针对企业级应用,J2ME(Java 2 Micro Edition)用于嵌入式设备和移动应用。...
- **《Thinking in Java》**:这本书不仅讲解了Java语言本身,还涉及了很多设计模式的概念,非常适合初学者阅读。 - **O'Reilly和Wrox出版社**:这两个出版社出版了许多优秀的Java书籍,涵盖了不同层次的学习内容...
- **在线教程和视频课程**:随着互联网的发展,现在有很多优质的在线资源可供学习。例如Codecademy、Udemy等网站提供的Java课程。 - **官方文档和论坛**:Oracle官方网站提供了大量的文档和技术支持,包括API文档、...
2. **用户界面设计**:详细讲解了如何使用JavaFX中的各种控件来构建用户界面,以及如何通过FXML进行布局设计。 3. **多媒体与动画**:深入探讨了JavaFX中的多媒体处理方法,包括如何播放音频和视频文件,以及如何...
首先,对于新手,建议从基础开始,《Java2 核心技术卷一:原理》和《Java2 核心技术卷二:高级性能》是很好的起点。这两本书由Horstmann撰写,覆盖了Java语言的基本语法、数据类型、面向对象编程、图形用户界面(GUI...