We have been developing mobile J2me apps, using CLDC (Connected Limited Device Configuration) and MIDP (Mobile Information Device Profile) for a while now but in the past our applications have been business apps and made extensive use of the high level api's provided by MIDP.
"Spear of the nation" - Java Mobile Game
We decided a while back to start increasing our skills in the lower level API's and what better way to do this than wirte a game. "Spear of the nation" is the result. Although the game was written more to learn the MIDP game api's and test the capabilities of the J2ME api we decided to release the game for general use. The usual waivers of warranties and liabilities apply. I.E. use at your own risk. The game was tested on a Nokia E70 and also on the Nokia S60 SDK . The application should run on any phone the supports CLDC1.1 andMIDP2.0. We could write it to use CLDC1.0, which would ensure more widespread support but there is other work we need to tend to. :)
I don't think the game is terribly exciting but the storey line and playability wasn't our main objective here.

How to Install
You can install the application using Over The Air (ota) provisioning simply click on this link from your cell phone's broswer to install "spear of the nation". You will get a security warning from your phone as we have not signed the jar file. You can just select "continue" and install the game if you wish.
Areas for Improvement
The game could be improved in many areas if there was time:
- Better assets, i.e. graphics and animations could be used,
- Game play could be improved eg introduce powers up, number of lives or "cannons",
- Add some sound,
- Improve the display of the bitmap fonts,
- Lots of room for performance and memory size optimisations
Acknowledgements
We used images from the internet for some of our assets. The bitmap font came from http://www.genvid.com/moonstruck/downloads/fonts.html
We got the sand tile and camo pic from the web as well.
Lessons Learnt
So far we have learnt the following lessons:
- One of the most important lessons was the speed of the phones' CPU. Since phones have different CPU's the game will run at different speeds on different handsets. So something than ran at acceptable speeds on the emulator ran dog slow on the handset. Speeding up the game on the handset meant it became almost impossible to test on the emulator with the same parameters so different builds had to be set up and synchronised,
- Once again the differences in the SUN Wireless Toolkit emulator and the S60 emulator begam apparent so the game would run fine on the SUN emulator but crash on the S60 emulator or even worse run on the S60 emulator but crash on the handset,
- Manufactureres such as Nokia have really poor support for their SDK on Linux. Nothing new here but more frustrating as the lower level apis necssitated more testing on the native SDK,
- Bitmap fonts was a new concept but we now have the basic idea,
- In a small game like this just as much time is spent setting up the"support" screens like "High Scores" as the game itself,
- There is definitley room for a library of functions to assist with game devleopment. We will probably develop one over time.
Feedback
Any feedback is welcome, especialy whether it runs on your model or not. The lower level API's should have more widespread support but then thats the theory.
Comments
Java Games
http://koderko.dk/J2METutorial/
Nice tutorial for complete beginners with all the free software required
to develop mobiles games.
.png images may be smaller than bitmaps for use in games.
"Spear of the Nation" game worked fine on my SAMSUNG SGH-G800.
-=Leon=-