December 2007
Intermediate to advanced
432 pages
8h 37m
English
ONE popular category of Java ME applications is games. Even when faster data networks make other types of applications more popular, games will always be an important part of the Java ME ecosystem.
MIDP has a Game API designed to help you create 2D action or board games. It has a souped-up canvas and supports building a screen using multiple layers. The entire API consists of five classes in the javax.microedition.lcdui.game package.
Suppose you write a typical game using Canvas. You do your own drawing in paint() and respond to key events in the event callback methods. You have a separate thread that updates the game’s state and requests screen updates using repaint(). It looks something ...
Read now
Unlock full access