Game API - Battle Tank

Description

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 built-in-DRM-based 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.

Compatibility

This MIDlet is compatible with Java Runtime 1.1.0 for Series 40 devices and newer.

This MIDlet has been tested on the following devices:

  • Nokia Asha 201 (Java Runtime 1.1.0 for Series 40)

  • Nokia Asha 202 (Java Runtime 1.1.0 for Series 40)

  • Nokia Asha 203 (Java Runtime 1.1.0 for Series 40)

  • Nokia Asha 302 (Java Runtime 1.1.0 for Series 40)

  • Nokia Asha 303 (Java Runtime 1.1.0 for Series 40)

  • Nokia Asha 305 (Java Runtime 2.0.0 for Series 40)

  • Nokia Asha 306 (Java Runtime 2.0.0 for Series 40)

  • Nokia Asha 311 (Java Runtime 2.0.0 for Series 40)

MIDlet project

The MIDlet project files are packaged as a zip file. To download the zip file, click the following link:

Download Battle Tank

Table: MIDlet details

MIDlet version

1.3

Creation date

27 June 2012

IDE

Eclipse and NetBeans

SDK

Nokia SDK 1.1 for Java

For earlier versions of the MIDlet, see the Nokia Developer Project.

MIDlet classes

The MIDlet consists of the following packages and classes (click to view the full source code):