J2me手机游戏(寻宝奇兵)设计于实现 下载本文

学校代码

学 号 1分类号

1密 级

毕业设计(论文)

题目: J2me手机游戏(寻宝奇兵)设计于实现

学习中心名称 专学指

业生导

名姓教

称 名 师

年 月 日

北京航空航天大学毕业设计(论文) 第 I 页

J2me手机游戏(寻宝奇

兵)设计于实 现

陈 枫

京 航 空 航 天 大 学

北京航空航天大学毕业设计(论文) 第 II 页

摘要

J2ME(Java 2 Micro Edition) 是近年来随着各种不同设备,尤其是移动通信设备的飞速发展而诞生的一项新的开发技术。它定位在消费性电子产品的应用上,对设备的智能化、多样化,提供了革命性的解决方案,并因其“Write Once, run anywhere”的Java特性而提高开发的效率

随着手机的日益普及、Java功能在移动设备上的实现,Java应用程序产生的手机增值服务逐渐体现出其影响力,对丰富人们的生活内容、提供快捷的资讯起着不可忽视的作用。特别是手机性能的逐渐增强,手机作为一个游戏平台越来越成熟了。本论文着眼于J2ME技术的应用,开发一款可用的手机游戏程序——寻宝奇兵

关键词:J2ME 手机游戏 手机

Abstract

J2ME is a kind of fast developing technology implemented on various devices especially mobile communication equipments. It focuses on application for consumptive electronic products, providing revolutionary solution to the intelligence and diversification of the equipment. It improves the efficiency of the development process thanks to its “Write Once, run anywhere” nature.

When mobile phone is getting ever more popular nowadays, with the implementation of Java technology on mobile equipment, increment of capital on communication service exhibits its force on people’s everyday life, providing them ever fast information just in hand. Mobile phone whose capability is greater is more and more mature for game. This dissertation focuses on implementation of J2ME technology and has developed a commercial game suite run on mobile phones—pan (for) gold.

This dissertation introduces J2ME and its relative technology as well as this program’s structure and analysis of implementation in details.

Key words: J2ME mobile game mobile

北京航空航天大学毕业设计(论文) 第 III 页

目 录

1. 背景与意义 ........................................................................................................................................................ 1

1.1 手机软件行情 ......................................................................................................................................... 1

1.1.1 娱乐游戏业务 ........................................................................................................................... 1 1.1.2 应用程序业务. ......................................................................................................................... 2 1.2 Java手机的优点 .................................................................................................................................. 3 1.3 手机游戏发展现状 ............................................................................................................................... 3

1.3.1 嵌入/内置式游戏 ..................................................................................................................... 4 1.3.2 In-Fusio ExEn娱乐平台 ........................................................................................................ 4 1.3.3 J2ME平台 .................................................................................................................................. 4 1.3.4 Synergenix Mophun平台 ........................................................................................................ 4 1.3.5 BREW游戏平台 .......................................................................................................................... 5 1.3.6 未来手机游戏趋势 ................................................................................................................... 5

2. J2ME开发环境及相关技术 ............................................................................................................................... 6

2.1 J2ME简介 ................................................................................................................................................ 6 2.2 J2ME的相关特性 .................................................................................................................................... 6

2.2.1 Configuration简介 ................................................................................................................ 6 2.2.2. Profile简介 .......................................................................................................................... 8 2.3 开发平台以及工具 ............................................................................................................................... 10

2.3.1 关于jbuild ............................................................................................................................ 10 2.3.2 关于Wireless Tool Kit ...................................................................................................... 11 2.3.3 关于Photoshop ...................................................................................................................... 11

3. 游戏策划与设计 .............................................................................................................................................. 12

3.1 游戏简介 ............................................................................................................................................... 12 3.2 主菜单设计 ........................................................................................................................................... 12 3.3 游戏场景设计 ....................................................................................................................................... 13 3.4 人物素材动作的设计 ........................................................................................................................... 15 3.5 建筑素材的设计 ................................................................................................................................... 16 3.6 地表绘制 ............................................................................................................................................... 17 3.7 建筑和人物的绘制 ............................................................................................................................... 18 3.8 地图的滚动 ........................................................................................................................................... 18 3.9 脚本事件 ............................................................................................................................................... 18 3.10 战斗处理 ............................................................................................................................................. 19 3.11 Npc行为模拟 ...................................................................................................................................... 19 4. 程序设计及主要代码实现 .............................................................................................................................. 20

4.1 程序的主要类清单以及关系图 ........................................................................................................... 21 4.2 MenuMIDlet类 ...................................................................................................................................... 22 4.3 MenuCanvas类 ...................................................................................................................................... 24 4.4 GameDisplayable 类 ........................................................................................................................... 26 4.5 Map类 .................................................................................................................................................... 28 4.6 Role 类 ................................................................................................................................................. 30 4.7 RoleAction 类 ..................................................................................................................................... 30