毕业论文论文范文课程设计实践报告法律论文英语论文教学论文医学论文农学论文艺术论文行政论文管理论文计算机安全
您现在的位置: 毕业论文 >> 论文 >> 正文

java手机游戏设计源代码 第16页

更新时间:2008-12-30:  来源:毕业论文

java手机游戏设计源代码 第16页
附录二  操作说明
在电脑中使用模拟器的步骤如下:
1   使用WTK的新建项目功能建立一个新项目,要求与Eclipse工作区下的项目名称MIDlet类名相同。
2   新建项目后,将Eclipse工作区下的.java文件拷入src文件夹,将.class文件拷入class文件夹(需要新建),将pic文件夹拷入res文件夹,点击生成,如一切正常。
3   选择项目-包-生成包。
4   生成的jar和jad文件存储在lzhhdm/bin目录下。
   5    运行Motorola SDK v4.2 for J2ME,使用MOTOA760手机模拟器进行测试。点击Lanuc按纽,即可以进行游戏了。
电脑键盘的方向键上、下、左、右可以控制玩家飞机的运动,回车可以发射子弹。
可以将鼠标移动到相应的按纽处单击,以测试相应的按纽。
附录三  英文文献及其译文
What's New in the J2ME Wireless Toolkit 2.2
by Jonathan Knudsen
June 2004
The award-winning J2ME Wireless Toolkit has become the de facto standard toolkit for developing applications for Java 2, Micro Edition (J2ME). Since its debut in 2000, the toolkit has evolved to keep pace with the rapidly changing face of mobile Java technology. Don't be misled by the small change in version number from 2.1. The new toolkit supports new optional APIs specified through the Java Community Process (JCP) in four vital areas: 3D graphics, multimedia messaging, Bluetooth networking, and data management. In this article I'll describe these new APIs and show you how they're implemented in the toolkit.
Before I do, take a moment to admire the updated DefaultColorPhone emulator skin. Since version 2.1, this skin has gotten a larger screen (320 x 240, or QVGA) and far more colors (4096 instead of 256).
Mobile 3D Graphics
JSR 184, the Mobile 3D Graphics API for J2ME (M3G), provides three-dimensional graphics functionality in a compact package that's appropriate for devices that support the most widely adopted J2ME software stack, the Connected, Limited Device Configuration (CLDC) and the Mobile Information Device Profile (MIDP). The API provides two APIs for displaying 3D content. The immediate mode API makes it possible for applications to create and manipulate 3D elements directly. On top of this layer is a scene graph API, also called retained mode, that makes it possible to load and display entire 3D scenes you've designed ahead of time. Applications may use whichever API is most appropriate, or a combination of retained mode and immediate mode. The JSR 184 specification also defines a file format for scene graphs, .m3g.
The toolkit's emulator fully supports JSR 184 and you'll find several MIDlets that show off the API's capabilities in the Demo3D project.
Life3D demonstrates the use of immediate mode:
PogoRoo is an interactive demonstration that features a bouncing kangaroo:
Finally, retainedmode shows how to load and render a scene graph file:
Multimedia Messaging
The J2ME Wireless Toolkit has long supported JSR 120, version 1.1 of the Wireless Messaging API (WMA); the new release supports WMA 2.0 (JSR 205), which expands WMA's capabilities to include Multimedia Messaging.
In the toolkit, messaging takes place in a simulated environment. If you run the emulator multiple times, applications on the emulators can communicate with each other, and you can use the toolkit's handy WMA Console utility to exchange messages with the applications in the same environment. Messages may conform to any of three standard protocols: Short Message Service (SMS), Cell Broadcast Service (CBS), or - new in version 2.2 of the toolkit - Multimedia Messaging Service (MMS).
You can address MMS messages and add any collection of files to the message.
Furthermore, the network monitor now displays MMS messages that are sent or received by the emulator.
Bluetooth and OBEX
The J2ME Wireless Toolkit emulator supports JSR 82, the Java APIs for Bluetooth, which includes two independent APIs: 
The Bluetooth API provides an interface to Bluetooth wireless
networking, including device discovery and data exchange.
The OBEX API allows applications to use the Object Exchange (OBEX)
protocol over Bluetooth or other communication channels.

The toolkit allows you to develop and test applications that use Bluetooth technology even if you don't have any actual Bluetooth hardware. The toolkit simulates a Bluetooth environment, in which you can run multiple emulator instances that can discover each other and exchange data using the Bluetooth API.

An example application, BluetoothDemo, shows how to transfer imagesfrom  one emulator to another.

The J2ME Wireless Toolkit implements OBEX transfer over simulated Bluetooth and infrared connections. The simulated infrared connection
follows the IrDA standard defined by the Infrared Data Association. The  toolkit simulates infrared transfers between multiple running emulators.
     
You can configure the Bluetooth and OBEX environment using the Bluetooth/OBEX tab in the toolkit preferences. This controls such
parameters as how long the emulator attempts to discover other devices in the simulated Bluetooth environment and the maximum packet size. See the toolkit's User's Guide for more details.
     
Local Files and Personal Information
The J2ME Wireless Toolkit supports JSR 75, the PDA Optional Packages for  the J2ME Platform, which also includes two independent APIs:

The FileConnection API gives MIDlets access to a local file system on the device.
The Personal Information Management (PIM) optional package includes APIs for manipulating contact lists, calendars, and to-do lists.
     
A real device may have a local file system which can be accessed using the FileConnection API. In the J2ME Wireless Toolkit emulator, a simulated file system is maintained as a directory on your hard disk.
     
The files your application can access using FileConnection are stored in subdirectories of <toolkit>\appdb\<skin>\filesystem., where <toolkit> is the installation directory of the J2ME Wireless Toolkit and <skin> is the name of the emulator skin. For example, the DefaultColorPhone emulator skin comes with a root directory installed called root1, which contains a file called Readme. The file's full path is <toolkit>\appdb\DefaultColorPhone\filesystem\root1\Readme.
     
You can manage the root directories that are available by choosing MIDlet > External events from the emulator window's menu. You'll see a small utility window for adding and removing roots. These actions will also generate events for a registered listener object.
In a real device, personal information might be stored in a proprietary
format in memory. The emulator uses a directory on your hard disk to
contain this information, accessible using the PIM API. All information is stored in <toolkit>\appdb\pim. Lists are stored in subdirectories of the contacts, events, and todo directories. For example, a contact list called Contacts is contained in <toolkit>\ appdb\ pim\ contacts\ Contacts.
    
Inside the list directory, items are stored in standard formats specified by the Internet Mail Consortium. Contacts are stored in vCard format, while calendar and to-do items are both stored in vCalendar format.
Summary
The J2ME Wireless Toolkit 2.2 is much more than an incremental update of an excellent tool. It includes support for four exciting new
specifications that together define six new APIs. As the world of wireless Java technology rapidly evolves, the J2ME Wireless Toolkit keeps pace and contains all the tools you need for
About the Author: Jonathan Knudsen [e-mail] [home page] is the author of several books, including Wireless Java (second edition), The Unofficial Guide to LEGO MINDSTORMS Robots, Learning Java (second edition), and Java 2D Graphics. Jonathan has written extensively about Java and Lego robots, including articles for JavaWorld, EXE, NZZ Folio, and the O'Reilly Network. Jonathan holds a degree in mechanical engineering from Princeton University.

 << 上一页  [11] [12] [13] [14] [15] [16] [17] 下一页

java手机游戏设计源代码 第16页下载如图片无法显示或论文不完整,请联系qq752018766
设为首页 | 联系站长 | 友情链接 | 网站地图 |

copyright©751com.cn 辣文论文网 严禁转载
如果本毕业论文网损害了您的利益或者侵犯了您的权利,请及时联系,我们一定会及时改正。