Sunday, September 12, 2004

Ouch! I just hit a brick wall.

Who ever said size does not matter was lying. I’m now over 128K for this project that means it won’t work on any MIDP Phone. On top of that I’ve still got to code and test the Bluetooth multiplayer section. Presently this stands at 133K

There are four things I can do to shrink the code.

1. Reduce the number of classes I import in each place.
2. Rename all the arrays I use by a few characters. (a quick reduction might be within the clsQuickList class)
3.Take advantage of the new Image and sprite functionality of MIDP 2.0. I have 72 little PNGs, which help make up a map. Each player will use up to 32 of those for their side. So all I have to do is put all 32 into one big PNG, load that PNG and copy the relevant bit to the screen, as I need them.
4.Obfuscate the App. I want to leave this till last even though I know it will compress the Jar by 30-40%. I need my long variable names for debugging purposes.

All of these options will take time, so it will be split equally between the Bluetooth and the new size requirements. The smaller I can get the app with Bluetooth, the better the Obfuscation is going to be.

0 Comments:

Post a Comment

<< Home