毕业设计说明书
手机版疯狂坦克游戏设计与开发
学生姓名: 学号:
学 院: 通信技术
专 业: 指导教师: 2010年 6 月
中北大学2010届毕业设计说明书
手机版疯狂坦克游戏设计与开发
摘 要
Java良好的跨平台特性在移动平台的开发中显示出了巨大的威力。Java语言面向对象的优势也使得开发游戏变得非常容易。
随着手机的日益普及、Java功能在移动设备上的实现,Java应用程序产生的手机增值服务逐渐体现出其影响力,对丰富人们的生活内容、提供快捷的资讯起着不可忽视的作用。本论文着眼于J2ME技术的应用,开发一款可商用的手机游戏程序——坦克大战。本程序的界面和运作方式继承于日本任天堂公司在20世纪80年代开发的Battle City游戏,将老少皆宜的经典作品移植到手机上来,为更流行的硬件平台提供应用软件。
本论文介绍了任天堂红白机的软硬件特性、J2ME的相关技术及本程序的结构分析和具体功能的实现。
关键词:J2ME,手机游戏,Java,坦克大战
中北大学2010届毕业设计说明书
Mobile Edition Crazytank Game Design and Development
Abstract
Java has an advantage of running in different platforms that shows its power in developing for the mobile device. The advantage of object-oriented of Java makes development of games easily.
When cell 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. This dissertation focuses on implementation of J2ME technology and has developed a commercial game suite run on mobile phones—Tank. This application inherits many characters of the old fashioned game Battle City which developed by Nintendo in 1980s. It transports the classical product to mobile phones, offering corresponding software for such more popular hardware platform.
This dissertation introduces the characteristic of Nintendo FC machine and its software, J2ME and its relative technology as well as this program’s structure and analysis of implementation in details.
Keywords: J2ME, Mobile game, Java, tank, Battle City
中北大学2010届毕业设计说明书
目 录
1 绪 论 ............................................................. 1 1.1手机软件的现状 .................................................... 1 1.2 游戏业务及J2ME概况 .............................................. 1 1.3 任天堂(NINTENDO)的8位FC机器和BATTLE CITY背景介绍 ............. 3 2 开发环境及需求分析 ................................................ 5 1 开发环境 ........................................................... 5 2.2 需求分析 ......................................................... 5 2.2.1功能需求分析 .................................................... 5 2.2 .2界面需求分析 ................................................... 5 3 程序结构、思想和相关技术 .......................................... 6 3.1 本程序需解决的有关技术问题 ...................................... 6 3.2 程序流程 ........................................................ 6 3.3 绘图与MIDP2.0新增的GAMECANVAS包 ................................ 7 3.3.1 提供低级绘制的Canvas类 ....................................... 7 3.3.2 Graphics类 ..................................................... 8 3.3.3 PNG格式 ........................................................ 8 3.3.4 Game包中的新功能 .............................................. 8 3.4 坦克的控制和敌方的智能运行 ..................................... 10 3.5 子弹的运行和控制 ................................................ 11 3.6 RMS数据库系统 ................................................... 12 3.7 内存使用的最佳化................................................ 13 4 程序分析和具体实现 .............................................. 15 4.1 游戏进入前的选择................................................ 15 4.2 主游戏逻辑及其涉及到的若干类 ................................... 16 4.3 坦克的共同行为.................................................. 18 4.4 玩家坦克的功能属性.............................................. 19 4.5 敌人坦克的功能属性.............................................. 20
第 Ⅰ 页 第 Ⅱ 页
中北大学2010届毕业设计说明书
4.6 子弹的运行和控制................................................ 24 4.7 记分系统........................................................ 26 5 程序的总结和展望 ................................................. 28 参 考 文 献 ......................................................... 29 致 谢 .............................................................. 30
第 Ⅱ 页第 Ⅱ 页