You Are Here:

Community: Wiki

This page was last modified on 25 September 2009, at 09:21.

Game API

From Forum Nokia Wiki

Reviewer Approved   

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 Wiki Articles

No related wiki articles found

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
User Rating: qfnZuserE5FratingQNx5E2E0000X