Size optimization

Wednesday, August 29, 2007 Labels:

Size does matter! At least in the world of mobile game development. There are a lot of different reasons why you want your midlet Jar to be as small and compact as possible. Phone limitations is the most important reason. Old MIDP 1.0 phones often have a jar size limit of around 64kb, although newer phones are much more tolerant. And a large jar-file takes up more of the precious cell-phone memory. On some platforms, the size of the jar file even decreases the amount of available heap memory you have when you’re running your midlet.

Another reason is cellphone operator restrictions in downloading files, at least it was a couple of years ago (some wap-gateways had a size limit for files being downloaded). Another one is mobile content distributor requirements. They prefer modestly sized games, and that makes sense. If you’re going to sell your game, the users buying it don’t want to wait forever while downloading and they don’t want to be charged extra just because you couldn’t fit your game in less than 500 kb.

So, how do you create the smallest possible midlet jar? There are a lot of things to consider:


  • Use few classes.

  • Optimize your PNG images.

  • Use a good obfuscator/bytecode optimizer.

  • Recompress your Jar file.

0 comments :

Post a Comment

 
Waqas Sadiq © 2014