资源描述:
《基于j2me手机拼图游戏的关键技术研究与实现 毕业论文 附测试代码》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、本科毕业设计设计题目基于J2ME手机拼图游戏的关键技术研究与实现姓名(学号)系别专业通信工程导师姓名-33-基于J2ME的手机拼图游戏的关键技术研究与实现作者指导教师摘要:在21世纪的信息时代,随着通信技术的高速发展,移动网络终端性能的不断提高与完善以及手机的高普及率,人们对手机终端应用开发的需求在不断增大,其对手机的需求已不仅仅是把作为一款简单的通讯工具,而是渐渐习惯于手机作为新的娱乐工具,因而手机越来越多的应用到人们的生活中,特别是手机游戏的推出受到了人们热烈的追捧,而我所设计的这款手机拼图游戏对于人们的智力开发有一定的帮助。在拼图游戏中用到的关键技术主
2、要有手机游戏的图像和按键处理、多线程的使用等关键技术及解决方案。在手机游戏图像处理这一块用了Canvas类的子类GameCanvas进行游戏画布,通过算法计算图形界面的尺寸。在按键事件处理方面也是通过Canvas类中的三个方法进行设置,包括按键按下的时候,按键长按的时候以及按键释放的时候。为了使玩家一边玩游戏的同时可以听到动感的声音,所以在这个拼图游戏中使用了多线程,由于多个线程之间可能会共享内存,而多线程的机制实际上相当于CPU交替分配给不同的代码段来运行,因此安全问题就成了重要问题。在这一方面也做了安全处理,在代码中增加了关键字synchronized,
3、使线程同步,如果其他线程要想调用这个资源就需要等待,保证了机制的安全运行。在异常方面,抛出的各种各样异常也做了相应的处理。经过以上技术处理基本解决了手机拼图游戏的运行及安全工作。关键词:J2ME插件;拼图;手机游戏。JigsawpuzzlebasedontheJ2MEmobilephonekeytechnologyresearchAbstract:Withtherapiddevelopmentofcommunicationstechnologyinthe21stcenturyinformationage,thehighpenetrationofmobilen
4、etworkterminalcontinuouslyimprovetheperformanceandimprovement,aswellasmobilephones,thedemandforapplicationdevelopmentofmobileterminalsinincreasingdemandformobilephonesnotjustasasimplecommunicationtool,butgraduallyaccustomedtothephoneasanewentertainmenttool,andthusthephonemoreandmor
5、etopeople'slives,especiallytheintroductionofmobilegameshasbeentheenthusiasticpursuitIdesignedthisphonejigsawpuzzlewiththehelpofpeople'sintellectualdevelopment.Thekeytechniquesusedinthejigsawpuzzlemobilegames,imagesandbuttons,multi-threadeduseofkeytechnologiesandsolutions.Thisonewit
6、hasubclassoftheCanvasclassGameCanvas-33-gamecanvas,bythealgorithmtocalculatethesizeofthegraphicalinterfaceinthemobilegameimageprocessing.ThreemethodsintheCanvasclassinthebuttoneventhandlerissetwhenthebuttonispressed,thebuttonalongtime,aswellasthebuttonisreleased.Inordertomakethepla
7、yerswhileplayingthegamewhileyoucanhearthevoiceofthedynamicmulti-threaded,sointhisjigsawpuzzle,maysharememorybetweenmultiplethreads,multi-threadingmechanismisactuallyequivalenttotheCPUalternatelyassignedtodifferentsectionofcodetorun,securityhasbecomeanimportantissue.Safehandling,int
8、hiskeywordthesynchronizedc