《堡垒》手机游戏的开发与测试摘要随着手机业务的迅速发展,手机游戏逐渐成为移动增值服务的兴奋点。本毕业设计就着眼于J2ME技术的应用,设计与开发一款探险类手机游戏(堡垒)。该堡垒游戏是基于J2ME开发的手机RPG游戏,采用midp2.0技术实现了菜单、地图、主角动作及怪物动作和AI等,主要通过精灵间的碰撞检测来触动事件发生。游戏的主流程是玩家利用手机键盘操作主角在堡垒中拾取道具破解迷宫,并且随着关数的增加,游戏的难度也逐渐增加。另外,游戏中还包括了排行榜,声音设置,帮助等各种附加功能。其中充满了趣味性和刺激性,是适合各年龄段的益智冒险类游戏。本论文介绍了J2ME的相关技术及该堡垒游戏程序的结构分析和具体功能的实现。关键词:J2ME;手机游戏;堡垒TheDesignandDevelopmentofaHandsetGame(Castle)AbstractWiththerapiddevelopmentofcellphonebusiness,cellphonegameshavegraduallybecomethehotspotofmobilevalue-addedservices.ThisgraduatedesignwhichfocusesonJ2MEtechnologydesignsanddevelopsahandsetadventuregame(castle).ThiscastlegameisahandsetRPGgamebasedonJ2MEwhichmainlyexaminesthedemon’scollisiontotouchofftheevent.Itusesmidp2.0technologytoachievethemenu,themap,theheromoves,monsterAIetc.Thegamehasincludedtheorderlist,thesoundestablishment,helpsoffunctionetc.Playeroperatestheleadthroughthehandsettocollectthestagepropinthecastletobreakthroughthelabyrinth.Thedifficultyofthegamewillgraduallyincreasealongwiththeincreaseofstage.Otherwise,thisintelligenceandriskgameisfilledwithenjoymentandtheirritatingqualitywitchsuitsmanyages.ThispaperintroducesrelatedtechnologyoftheJ2MEandthestructureanalysisandtheconcretefunctionrealizationofthiscastlegameprocedure.Keywords:J2ME;handsetgame;castle目录论文总页数:23页1引言......................................................................12手机游戏的现状和J2ME的概况.................................................12.1软件现状................................................................12.2J2ME概况...............................................................22.2.1J2ME的由来.........................................................22.2.2J2ME的3层体系结构及MIDP简介.......................................22.2.3Configuration和Profiles............................................32.3J2ME现状和前景.........................................................42.4手机游戏业务............................................................53开发环境介绍...............................................................53.1开发环境................................................................53.2关于SONYERICSSONWIRELESSTOOLKIT.........................................54手机游戏(堡垒)的开发......................................................54.1游戏的的思路、构想......................................................54.1.1游戏想法的产生......................................................54.1.2对游戏设计的初步认识................................................64.1.3模块成型阶段........................................................64.2程序的类结构............................................................74.3游戏的流程图............................................................74.4游戏的实现..............................................................84.4.1主类GameMIDlet的实现...............................................84.4.2游戏画布MyGame类的实现............................................134.4.3玩家精灵GamePlayer类的实现........................................174.4.5SoundEffects类的实现......