基于J2ME的移动蓝牙联网游戏研究与应用
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
随着移动通信技术的发展和无线数据业务的进步,无线终端在人们日常生活中的使用也逐渐得到普及,手机已被赋予了除通话以外的其他许多功能,全新的手机游戏领域已逐渐聚焦了众多软件开发商的目光。
     目前手机游戏是发展最快的电子娱乐形式,玩家更喜欢那种可以随时随地就能玩的在线联网游戏。但是根据目前的条件,网络游戏将面对很长时间的延缓。作者注意到一般具有蓝牙手机的用户只是用其传送文件、图片,但是很少有用其玩游戏的。所以在目前情况下,本文一改往日传统的联网方式,采用越来越流行的蓝牙技术组建局域网以解决由终端、资费等带来的问题。蓝牙并非一项新的技术,但是利用JAVA在MIDP平台上开发蓝牙应用程序却是一项新的技术,作为短距离内无成本的无线网络技术,蓝牙有着巨大的发展潜力。
     本文利用J2ME平台及JAVA蓝牙无线API开发了一款手持设备上的蓝牙联网游戏。目前,在无线领域开发游戏可以选择的平台有很多种。通过比较,本文选择了普及性最好的J2ME开发平台,并对J2ME的整个体系作了详细的讲解,主要包括J2ME的有限设备配置(CLDC)和移动信息设备简表(MIDP)方面的介绍。本文围绕J2ME平台上的手机游戏开发技术为主题,进行了游戏开发的基础理论和相关开发技术的研究,并在J2ME平台上完成了设计与实现。另外详细分析了本次手机游戏开发所需的关键技术以及面对的挑战,如内存空间有限、多线程的使用等问题。研究重点放在游戏的整体架构设计、功能模块设计、蓝牙联网模块设计、蓝牙客户端与服务端数据传输以及多人联网中的同步问题。在合理选择设计方案的同时,尽可能的优化J2ME的实现。游戏的实现从构建运行环境入手,对类进行设计,并且给出了几个具体类的实现以及游戏的运行结果,在模拟与真实环境下均进行了测试。最后,对全文工作进行了总结,并对下一步的工作和J2ME移动应用开发的前景进行了展望。
Wireless terminals in people's daily life use have gradually become popular with the development of mobile communication technologies and the improvement of wireless data traffic. Cell phones are given another function besides calling. A brand new cell phone games' field attracts many software developers' eyes.
     The video game market is currently the fastest growing form of E-entertainment. Today's players like multiplayer online games and have the ability to play anytime/anywhere using cell phones. However, according to the existing conditions, online games will face very long delay. The author noticed that most users generally use bluetooth phones to transmit files and pictures, few people use it to play game. So in present circumstances, the author changed the traditional mode of networking and adopted more and more popular bluetooth technology to set up a LAN, to solve problems incurred by mobile terminals and cost. Bluetooth is not a new technology, but using JAVA to develop bluetooth applications on the MIDP platform is a new one. As a no-cost, short-distance wireless networking technology, bluetooth has great potential development advantages.
     This thesis uses J2ME platform and JABWT to develop a bluetooth based online game on handheld devices. There are a variety of development platforms in wireless field. After detailed comparison, we select the best popular J2ME platform for this development and discussed the entire J2ME architecture in detail, including CLDC and MIDP, focusing on the game development which is based on the J2ME platform. We study basic theory and related development technique in the first part of the thesis and then implement an application at last. In addition, some key technologies and challenges, e.g. a limited memory space and the usage of multithread, are analysed. Key points of this thesis are design of the entire architecture, function, connection between client and server and the synchronization of multiplayer. We choose a reasonable design pattern for optimizing the realization of J2ME. System realization is started with building system operation environment, and then objects of system classes. The detailed realization of some concrete class objects has been described and the system operation results have been given in the final part of the thesis. The implemented demo system has been tested in a simulation as well as in a real environment. The last chapter gives summary and prospect of the system.
引文
[1]罗元兵.基于J2ME的无线网络游戏设计与实现[硕士学位论文].成都:电子科技大学,2007:1-5。
    [2]中国实验室.资讯中心[EB/OL].http://www.chinalabs.com/cache/doc/05/08/05/69230.shtml.2005.
    [3]李研,刘晶晶,俞一鸣.J2ME技术开发与应用[M].北京:机械工业出版社,2006:2-3.
    [4]王森.Java手机/PDA程序设计入门[M].北京:电子工业出版社,2004:6-15.
    [5]郎锐,孙方.J2ME手机程序Eclipse开发基础[M].北京:机械工业出版社,2006:11-15.
    [6]Predrag Maksimovic.Multiplayer Mobile Gaming Support in JAVA 2 Micro Edition[硕士学位论文].Florida:Florida Atlantic University,2004:50-54.
    [7]陈立伟,张克非.精通Java手机游戏与应用程序设计[M].北京:中国青年出版社,2005:20-25.
    [8]Sun官方网站[EB/OL].http://java.sun.com/javame/index.jsp.2008.
    [9]陈旭东.J2ME应用教程[M].北京:北方交通大学出版社,2007:26-31.
    [10]Jason Lain,Deaboway Chou.J2ME & Gaming[M/OL].http://sourceforge.net/projects/j2megamingbook/.2004.
    [11]Laurentiu Lucian Petrea,Dan Grigoras.Towards Introducing Code Mobility on J2ME[C].ISPDC,2005:173-182.
    [12]介绍J2ME可选包的概念[EB/OL].http://www.apsoft.com.cn/down/article/2456/Article110121_1.htm.2007.
    [13]Siti Hafizah Ab Hamid,Leong Yu Fung.Learn Programming by Using Mobile Edutainment Game Approach[C].DIGITEL,2007:170-172.
    [14]MATRIX.BlueTooth探索系列(五):J2ME蓝牙实战入门[EB/OL].http://www.matrix.org.cn/resource/article/2005-10-17/BlueTooth_43868.html.2005.
    [15]詹建飞.j2me开发精解[M].北京:电子工业出版社.2006:365-392.
    [16]詹建飞.JAVA ME核心技术与最佳实践[M].北京:电子工业出版社.2007:446-488.
    [17]L.Lef ever,A.Saroukou.Active network support for deployment of Java-based games on mobile platforms[C].In First International Conference on Distributed Frameworks for Multimedia Applications,2005:88-95.
    [18]刘书生,赵海.蓝牙技术应用[M].沈阳:东北大学出版社,2001:7-10.
    [19]JSR-82.JavaAPIs for Bluetooth Wirless Technology[EB/OL].http://jcp.org/en/jsr/detail?id=082.2008
    [20]C.Enrique Ortiz.使用Java蓝牙无线通讯技术API[M/OL]. http://www.javaresearch.org/members/exce4/1141561990742Java6APLrar.2006:4-8.
    [21]马毅华,冯恩信.基于JSR-82规范的J2ME蓝牙应用及其实现[J].无线电工程,2000,34(8):48-50.
    [22]Andre N.Klingsheim.J2ME BlueTooth Programming[硕士学位论文].Unversity of Bergen,2004:52-56.
    [23]手机开发平台[EB/OL].http://dukeandbyl.bokee.com/1390683.html.2005.
    [24]庄东,刘晓华.JBuilderX无线应用开发[M].北京:电子工业出版社,2004:10-13.
    [25]James Keogh.J2ME:The Complete Reference[M/OL].Osborne/McGraw-Hill,2003:10-15.
    [26]DENG Zhong-hua.Review of Technique Body Based on J2ME for Programming Mobile Phone Games[C].International Conference on Wireless Communications,Networking and Mobile Computing,2005:1383-1386.
    [27]胡耀华.基于BREW手机游戏的内存管理研究[J].工程地质计算机应用,2007(3):34-36.
    [28]林胜利,王坤茹,孟海利.Java优化编程[M].北京:电子工业出版社,2005:26-52.
    [29]Vander Alves,Ivan Cardim.Comparative Analysis of Porting Strategies in J2ME Games[C].ICSM,2005:125-132.
    [30]雷剑.基于J2ME的手机游戏开发关键技术的研究与实现[硕士学位论文].南昌:江西师范大学,2007:26-30.
    [31]Alf Inge Wang,Michael Sars Norum.Issues related to Development of Wireless Peer-to-Peer Games in J2ME[C].AICT/ICIW,2006:117-118.
    [32]冯迪.基于J2ME平台的手机游戏设计与实现[硕士学位论文].成都:电子科技大学,2007:60-61.
    [33]崔岩.基于移动平台的多人游戏系统设计[硕士学位论文].天津:天津大学,2006:6-7.
    [34]NOKIA Forum.Game over Bluetooth:Recommendations to Game Developers[M/OL].http://forum.nokia.com/info/sw.nokia.com/id/2b17fb6f-b9a4-4cd8-80fd-94b8251a048e/Games_O ver_Bluetooth_v1_0_en.zip.html.2004.
    [35]M.J.Moron,J.R.Luque,A.A.Botella.J2ME and smart phones as platform for a Bluetooth Body Area Network for Patient-telemonitoring[C].EMBC,2007:2791-2794.
    [36]Aqib Mumtaz,Faisal Tehseen Shah.Games over Bluetooth[C].IEEE International Conference on Computer Systems and Applications,2006:1167-1170.
    [37]刘挺,尤韦彦,王耀明.蓝牙系统服务发现协议(SDP)的分析和应用[J].计算机工程,2002,28(6):7-8。
    [38]汤琳,阮帮秋.蓝牙服务发现协议(SDP)的实现[J].无线电工程,2002,32(2):35.
    [39]熊江.蓝牙SDP研究[J].航空计算技术,2003,33(1):86-88.
    [40]Juan-Carlos Cano,Pietro Manzoni,C-K Toh.First experiences with Bluetooth and Java in ubiquitous computing[C].ISCC,2005:223-228.
    [41]韩鹏,李成忠.设计模式及其在J2ME中的应用[J].成都信息工程学院学 报,2004,19(3):333.
    [42]姜帆,罗蕾.基于MVC模式的J2ME应用程序框架设计[J].单片机与嵌入式系统应用,2007(3):15-17.
    [43]Garner.Mobile Bluetooth networking:technical considerations and applications[C].Fourth International Conference on 3G Mobile Communication Technologies,2003:274-276.
    [44]梁旗军,李佳凯,樊鑫.J2ME中多线程网络连接编程的分析[J].计算机与信息技术,2006:45-47.
    [45]Haldin Kimm,Sung Y.Shin,Charlie Y.Shim.Two approaches to improve Java MIDP record management system in wireless devices[C].IEEE International Conference on Electro Information Technology,2005.