[J2ME] Metal Gear Liquid - Stealth/Action

Metal Gear Liquid is a small J2ME game based on the well-known Metal Gear Solid games from Konami. The goal is to infiltrate a base, find keys and disable nuclear weapons in a bunker, without getting detected.

The game can be download from my site (source included), where screenshots are available.

Preview:

http://www.bartvanheukelom.nl/metalgearscreens/metalgear14.png

First off, looks really nice.

As a J2ME dev here are my comments:

Nicely written code and well commented.

  1. Compress your images
    I ran your images through pngcrush with the brute flag and the imgs shrunk from 535kb to 165kb

1.2 Optimise your tileset
the thing will be inflated on the device and nearly half of the graphic is not being used.

  1. try out amr instead of mp3/mid

  2. you still have the thumbs.db in your mgs/guard folder

  3. use an obfuscator to shrink your code

The more memory you waste the less you have to run your app with.
On an emulator you can have more then enough but a device will have less.

  1. Remove the GameException as far as possible.
    Mobiles are slow and try/catches slows it down even more
    Make sure what you write will run.
    If something can throw an exception, try and make sure that condition does not happen.
    If you cannot, like with lib stuff, handle the error there and then.

  2. conserve memory
    Make sure you null objects, close connections, call System.gc() after memory heavy segments or after freeing stuff
    Don’t create objects if you do not have to and use the ObjectPool Pattern where possible.

This also includes creating objects in loops. Most devices still only support 1.4.

Again, it looks very nice and I must commend you on the great work!

I would love to see more in the future.

Thank you for your comments. I created this game a while ago as a school project, and don’t think I’m going to improve it in the near future. I’ll keep those things in mind though, if I ever decide to improve this game or work with J2ME again. In the meantime I’ve moved on to bigger things (see signature).

I might add that the game engine (though heavily modified by me) was supplied by school.