This page was last modified 05:03, 13 September 2007.
Game API
From Forum Nokia Wiki
The Game API is a set of Java classes which enable easier development of rich gaming content on MIDP 2.0 enabled mobile devices. The Game API classes are stored in the javax.microedition.lcdui.game package and included into the standard MIDP 2.0.
The Game API classes are: GameCanvas, Layer, LayerManager, Sprite and TiledLayer.
Contents |
GameCanvas
GameCanvas is an extension of the standard Canvas class from the LCDUI. The main features of the GameCanvas are controlled graphics flushing and ability to query states of the game keys. Quite many mobile platforms are supporting GameCanvas with double-buffering for the graphical content to provide smooth image animations on the mobile display.
Layer
Layer is an abstract class representing a visual element of a game. Each Layer has its position (in terms of the upper-left corner of its visual bounds), width, height, and can be made visible or invisible.
LayerManager
The LayerManager manages a series of Layers. The LayerManager simplifies the process of rendering the Layers that have been added to it by automatically rendering the correct regions of each Layer in the appropriate order.
Sprite
Sprite is a basic visual element that can be rendered with one of several frames stored in an Image; different frames can be shown to animate the Sprite. Several transforms such as flipping and rotation can also be applied to a Sprite to further vary its appearance. As with all Layer subclasses, a Sprite's location can be changed and it can also be made visible or invisible.
TiledLayer
A TiledLayer is a visual element composed of a grid of cells that can be filled with a set of tile images. This class allows large virtual layers to be created without the need for an extremely large Image. This technique is commonly used in 2D gaming platforms to create very large scrolling backgrounds or game fields.
References
Internal Links
| Related Discussions | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| multiplayer mobile game(LOBBER aka LINK-5)...help needed..plz | toonaughty85 | Mobile Java General | 5 | 2007-02-22 12:33 |
| Java Game & Phone Support | yonder68 | Mobile Java General | 1 | 2005-11-11 13:16 |
| How to debug a mobile game? | JohnLeeHuber | Mobile Java General | 6 | 2005-07-06 14:59 |
| Game Development | pckane | Mobile Java General | 3 | 2003-02-18 16:31 |
| Finished J2ME application and now ? | pvermeulen | Digital Rights Management & Content Downloading | 1 | 2003-06-29 01:21 |
