1、基于 J2ME 的手机游戏开发 摘要:随着通信技术的发展和手机的普及,手机游戏的开发技术越来越为人们所关注。以 J2ME 为开发平台,利用 Java 提供强大工具,不但可以在手机上实现静态 HTML 技术所无 法实现的计算处理、数据存储、与服务器的通信等功能,而且能够开发各种手机游戏。本文 在介绍 J2ME 及其体系结构的基础上,以贪吃蛇游戏为实例,描述了借助J2ME的 MIDlet 类库开发手机游戏的过程。 关键词:关键词:手机游戏; MIDP 应用程序; 永久性数据 Develops based on the J2ME handset game Abstract: Along with c
2、ommunication development and handset popularization, people more and more pay attention to the handset game development technology. Develops the platform take J2ME, provides the powerful tool using Java, not only may realize the handset functions that static HTML technology be unable to realize, suc
3、h as computation processing, data storage, and communication with server, but also can develop all kinds of handset games. On the basis of the technology and architecture of J2ME being introduced, the gluttonous snake game was taken as a example, the development process of handset game with the aid
4、of the J2ME MIDlet class library is described in this article. Key Words: Handset game; MIDP application pragram; Permanent data 目 录 第一章 绪论. 1 1.1 研究背景 1 1.2 研究内容 1 第二章 J2ME 及其体系结构概述 2 2.1 J2ME 简介 2 2.2 J2ME 体系结构 . 2 2.3 移动信息设备简表概述 3 2.3.1 MIDP 的目标硬件环境 3 2.3.2 MIDP 应用程序 . 3 2.3.3 CLDC 和 MIDP 库中的类 3 2.4 J2ME API 简介 4 2.4.1 MIDP API 概述 . 4 2.4.2 MIDlet 应用程序 . 4 2.4.3 使用定时器. 5 2.4.4 网络 6 2.4.5 使用 Connector 7 2.4.6 使用 HttpConnection 8 2.4.7 永久性数据(RMS) 9 2.4.8 存储集(Record Store) 10 2.4.9 记录. 11 2.4.1