Java Reference
In-Depth Information
Summary
This chapter described the Game API, a set of classes that simplify developing two-dimensional
games. The GameCanvas class provides a drawing surface that can easily be rendered in a game
thread. GameCanvas also provides key state polling, useful for detecting user input in a game
thread. The remainder of the Game API is based on layers, which are elements that can be
combined to create complex scenes. LayerManager makes it easy to maintain multiple layers.
The Sprite class supports animation and collision detection. Large scenes or backgrounds can
be constructed efficiently using TiledLayer . Finally, Display includes methods for controlling
the backlight and vibration of a device. Game developers have a lot to be happy about. Read on
to the next chapter and discover how to add 3D graphics to your MIDP applications and games.
Search WWH ::




Custom Search