The MIDlet has been made to look as finalized as possible. It has all the basic views: splash screen, start menu, settings, and game screen. The game screen shows 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 number of laps, and displays the best lap time. There is a speedometer on the bottom-right corner. The car slows down when driven off-track.
The Series 40 full touch version of the MIDlet additionally supports landscape mode.
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 wait before driving starts. This is indicated with the "3, 2, 1, GO" graphics. These also appear if the game is paused because the user receives an incoming call or the screen saver is activated.
Controlling the car depends on the device:
On Series 40 touch devices that support the Mobile Sensor API and the landscape mode, namely Series 40 full touch devices, tilting the device left and right turns the car. Pressing the brake button in the bottom-left corner slows the car down.
On Series 40 touch and type devices that do not support the Mobile Sensor API, touching the screen and dragging to the left or right turns the car. Pressing 8 on the keypad slows the car down.
On Series 40 non-touch devices, the car is controlled with the navigation keys (or keys 4,6, and 7). Pressing 0 or the right softkey opens the main menu.
Beyond the standard MIDP 2.0 APIs, the MIDlet uses the Gesture API and Mobile Sensor API. In the code, the API usage is wrapped so that the MIDlet can be run even on devices that do not support the Gesture API or Mobile Sensor API.
The MIDlet design takes into account the following key points to consider when developing a Java ME game for the Series 40 platform:
Series 40 devices are generally much slower than Symbian devices. This means you have to do a lot of threading to avoid stuttering.
If you have to perform trigonometric calculations, try to precalculate as much as possible so that when the game is running, everything is already calculated and all you have to do is assign values.
The heap memory on Series 40 devices is limited, so the bigger the resolution of your images, the more memory they consume. For example, the track size limit for this game is around 600 x 600 pixels.
Series 40 devices impose a limit on the maximum JAR package size, which means that you have to adjust, for example, the level of detail in images and the quality of sounds to stay under the limit. On Series 40 touch devices, the maximum JAR package size is 2MB.
For information about implementing the MIDlet , see section Implementation.