This example MIDlet shows you how to use the Game API to create a Java game called Battle Tank for Series 40 and Symbian devices. The example also shows you how to use the In-App Purchase API to integrate a Nokia Store purchasing feature into a Series 40 MIDlet. While the gaming features in this example are compliant with both Series 40 and Symbian, the in-app purchase feature is only available on Series 40 devices and therefore the MIDlet as a whole can only be run on Series 40 devices that support the In-App Purchase API. For an earlier version of the MIDlet that does not include the in-app purchase feature, see the Nokia Developer Project.
Figure: Battle Tank in-game view
For a tutorial that shows you how to create this MIDlet, see section Example: Creating a game with an in-app purchase feature.
This MIDlet is compatible with Java Runtime 1.1.0 for Series 40 devices and newer.
The MIDlet project files are packaged as a zip file. To download the zip file, click the following link:
For earlier versions of the MIDlet, see the Nokia Developer Project.
The MIDlet consists of the following packages and classes (click to view the full source code):
com.nokia.example.battletank
com.nokia.example.battletank.game
com.nokia.example.battletank.game.audio
com.nokia.example.battletank.game.dialog
com.nokia.example.battletank.game.entities
com.nokia.example.battletank.menu