ChocoBan: Ingredients

If you have worked with Sun's or Sony Ericsson's development kit for J2ME, you know the drill. The graphics and sound resources below should be put in the "res" directory. The source files form a package called "com.javaonthebrain.choco" and need to be put in a subdirectory com/javaonthebrain/choco/ in "src".

Source code

The game has only four classes. When it comes to platform compatibility, the awkward parts are the ones that have to do with graphics and sound. I have separated those into one class called "Coord" (holds sizes and co-ordinates) and one called "SoundThread" (plays sound effects). Hopefully they will be the only parts that need tweaking.

General files: ChocoBan.java, ChocoCanvas.java.

Sound thread for Sony Ericsson and some Nokia models (like the 5200): SoundThread.java.

Graphics

Make sure you use the right graphics to go with the coordinates.

Icons are a little trickier. The files above include a 16x16 icon, but some phones require something larger. You can use the PNG file on the left and scale it to the appropriate size.

Sound

Most modern cell phones can handle AMR sound files. Otherwise you may want to use WAV instead. Or, in case there is no support for sampled sounds at all, MIDI should work. Unfortunately I don't have any corresponding sound files of that type.

Sounds in AMR format: amr.zip.

Sounds in WAV format: wav.zip.

Level data

The level definition files belong with the graphics and sound resources. Download and unpack.

levels.zip