The application has all the basic views: splash screen, start menu, settings, and the game screen. The game displays a top-down view of a car on a simple track. There are three tracks to choose from. The game monitors lap time and the amount of laps and displays the best lap time. There is also a speedometer in the bottom-right corner. The car even slows down when driven off track.
Figure: Main menu in portrait and landscape modes
Figure: Gameplay view in portrait and landscape modes
Playing the game is simple. When the game is started, there is a three-second waiting time before driving starts. This is indicated with the "3, 2, 1, GO" graphics. Controlling the car depends on the device.
On devices that support the sensor API and landscape mode: Rotate the car by tilting the phone left and right, and brake by pressing the brake button in the bottom-left corner.
On devices that do not support the sensor API button bu support gestures: Rotate the car by dragging to the left and the right and brake by pressing the 8 key.
On devices that do not support sensors or gestures: Use the navi button (or keys 4,6, and 7) to control the car and press 0 or the right softkey to access the main menu.
In addition to the standard MIDP 2.0 APIs, the MIDlet uses the Gesture API and the Sensor API. However, the usage of those APIs is wrapped so that the game does not crash if the device does not support them.
Series 40 devices are generally slow. This means you have to do a lot of threading to avoid stuttering.
If you have to do trigonometric calculations, try to precalculate as much as possible so that when the game is running, everything has already been calculated and all you have to do is assign values.
Heap memory is very limited so the bigger resolution your images have, the more memory they will consume. For example, the size limit of the track for this game is around 600x600 pixels.
In Series 40 phones, the maximum JAR file size is 1MB, which means that you have to adjust the level of detail in images and the quality of sounds etc. to stay under that limit.
For information about implementing the MIDlet , see section Implementation.