手机游戏—超级玛莉的设计与实现Java+J2me
目 录
前 言 1
1 Java与J2ME的概述 2
1.1 Java的简介 2
1.1.1 Java的发展与其版本的变迁 2
1.1.2 Java语言的特点 3
1.1.3 Java技术在无线应用方面的优势 4
1.2 J2ME的简介 5
1.2.1 J2ME的发展背景 5
1.2.2 J2ME与手机编程的关系 5
1.2.3 J2ME的体系结构 6
1.2.4 J2ME的配置 8
1.2.5 J2ME的描述 9
1.2.6 J2ME的开发流程 10
2 游戏开发环境的介绍 11
2.1 开发工具的选择 11
2.2 手机模拟器开发包 11
2.3 Java开发环境的搭建 12
3 需求分析 15
3.1 目前手机游戏开发的局限性 15
3.2 游戏载体的缺点 15
3.3 本游戏需解决的问题 17
3.4 手机游戏的总体设计 18
3.4.1 程序的总体架构 18
3.4.2 程序的流程图 19
3.4.3 本程序的核心类 20
3.5 本游戏中所用到技术 22
3.5.1 MIDP2.0对游戏的支持 22
3.5.2 内存的优化 24
3.5.3 内存检测器 24
3.5.4 关于混淆器的应用 24
4 游戏的详细设计 26
4.1 游戏的主菜单 26
4.2 滚屏游戏的具体实现 29
4.2.1 地图绘制的实现 29
4.2.2 碰撞检测的实现 31
4.2.3 键控处理的实现 34
4.2.4 滚屏的实现 38
4.2.5 主要人物玛莉(Mario)的实现 40
4.2.6 游戏角色乌龟(Tortoise)的实现 41
4.2.7 游戏的主画布(Canvas)类的实现 42
4.2.8 游戏主管理(Manager)类的实现 46
4.3 游戏的优化 47
4.3.1 游戏中新对象的产生和垃圾的收集 47
4.3.2游戏中关于来电挂起和恢复的处理 48
5 结 束 语 50
参考文献 51
致 谢 52
手机游戏—超级玛莉的设计与实现
摘 要: 随着手机的日益普及,人们对手机的娱乐功能的需求也相应增强,尤其是近几年手机2D、3D技术的日益成熟,大大地提高了手机游戏的娱乐性、操作性和方便性等多方面的性能。J2ME(Java 2 Micro Edition)是专门针对移动设备和嵌入式设备开发的1种技术,它不仅具有很好的跨平台性,而且提供了很好的可扩展接口,如Web服务、无线消息、多媒体等。同时J2ME平台可以通过将CLDC、CDC、及其对应的Profile与可选包加以组合进1步扩展其功能,以满足特定的市场需求和技术需求[1]。
本设计应用J2ME技术,开发了这款具有1定商业价值的手机游戏—超级玛莉。本款游戏是借鉴PC机超级玛莉的思想,在手机上实现了当年红白机上的经典游戏,对于玩家们来说应是10分熟悉的。本论文主要包括以下几方面的内容:
第1章 Java与J2ME的概述。主要介绍了Java语言的特点与发展历史,对J2ME的概念及体系结构做了详细的讲解。
第2章 游戏开发环境的'介绍。本章主要介绍了手机游戏开发环境J2ME的配置,其中还详细讲解了J2ME WTK的组成部分和各部分的功能。
第3章 需求分析。通过对手机游戏开发现状的了解,分析出在游戏开发中会遇到的困难。
第4章 游戏的详细设计。其中主要讲述了游戏几个主类的实现。
关键词: J2ME;MIDP2.0;WTK;手机游戏
The Design and Realization of Mobile Game
-The Super Scripture Of Mario
Abstract: J2ME (Java 2 Micro Edition) is a kind of developing technology directed at mobile equipment and plug-in the increasing-development of the communication technology, as well as widespread of mobile phones, the users one becoming eager for the entertainment funetions of mobile phones, which makes Java Phones more and more cially in recent years, mobile phone 2D.3D technologies are matureing. The requirement for the ation and convenience of mobile phones increases while J2ME realizes it. It plays a critical role in communication equipment and eariching people’s amusement in daily life. J2ME not only serves a good cross-platform, provides a good interface such as WEB service Willess news. Multi-media etc also provides a installed database that connects with the database. At the same time,J2ME can furthru extend its functions by organizing CLDC,CDC and related profile with the atternatire packages to meet specific market needs and technology needs.
The design has applied J2ME technology, and developed the mobile phone game with great commercial value. This game is, the idea came from a PC super in mobile phones achieved in the classic white board games, the players who should be very familiar.
Chater One. The general introductioin of Java and J2ME. It maily introduces the features and history of Java language. It also explained the concept and system structure of J2ME.
Chater Two. The introduction of the developing environment o. It maily introduces the configuration of J2ME, in which the components and the functions of J2ME WTK are also included.
Chater Three. Requirement analysis. According to our knowledge of current of the development of mobile phone games we can discover the difficulties in developing a game.
Chater Four. The detailed design of the game. It maily describes the design of several main classes of games.
Keywords: J2ME;MIDP2.0;WTK;Mobile phone games
前 言
无线通信技术的飞速发展和普及,已经使每1个人真切地感受到了技术带给人们的便利。手机和各种小巧实用的电子设备已经深入到了我们生活中的方方面面。就拿手机来说吧,它几乎已成为人们生活中的必需品,但现在的手机还仅仅停留在通话上,高的带宽该怎样利用已经提上了议事日程,只有丰富的应用才会有未来移动通信的大发展。那么如何提高移动电话的利用率、创造竞争优势,必然是软件开发人员不可不知的技术。J2ME的MIDP规范提供了Java与无线通信这两种技术的综合,让软件开发人员能够在已熟悉的Java技术之外,再具备1个迎接软件应用新趋势的开发工具
-
高校辅导员人格魅力论文参考文献
参考文献[1]张丹凤.高校辅导员人格魅力之我见[J].长沙大学学报,2011(1)[2]马梁、敖冰峰.浅析高校辅导员工作的创新[J].北方经贸,2009(7)[3]张恩、杨志昂.90后大学生的`特点及其对辅导员工作的新挑战[J].学园,2010(5)...
-
国人枢椎侧方椎弓内固定的解剖学基础
作者:侯黎升,贾连顺,谭军,阮狄克,叶晓健,王人鹏【关键词】,脊柱【Abstract】AIM:ToprovidetheanatomicalbasisforlateralarchscrewfixationinC2vertebraofChinese.METHODS:FiftysevendryC2vertebraofChineseweremeasured.RESULTS:Theparametersobtainedofanteriorpor...
-
探讨计划免疫工作中如何更好地履行宣教与查对制度
【关键词】计划免疫宣教讲座查对制度计划免疫工作是是根据疫情监测和人群免疫状况分析,按照规定的免疫程序,有计划地利用疫苗进行免疫接种,以提高人群免疫力,达到控制乃至最终消除一些相应传染病的根本措施。随着国家扩大免疫规划的实施,扩大免疫规划取得了很大的成...
-
人力资源管理激励探析
激励机制,就是在管理活动中根据人的心理变化,激发人的动机来启动人的内在动力,促使每一个人、每一个企业,迅速、有效地去追求目标而建立的一系列有机结合的管理方式。以下是本站小编为您整理的人力资源管理激励探析,希望能提供帮助。摘要:企业管理的关键是人本管理,人...