NBA 2006 was a basketball game for cell phones that I worked on while at Knockabout Games. It was a J2ME port of the BREW version of the game. It was an interesting and sometimes frustrating experience. After years of working on epic console projects, the idea of working on small cell phone games with short schedules and an emphasis on gameplay rather than graphics sounded like a breath of fresh air.
The reality was somewhat different.
It felt like 10% of the time was actually spent on the game, 30% went on compatibility issues between different handsets and 60% on finding ways to trim the size of the game to fit in the limited memory or download package of a particular phone.
Download packages were incredibly tight – 100KB for game+graphics+sound – and optimizing the javacode for space was difficult. Back in the 8-bit era, 100KB would be more than enough, but when you’re operating with javacode instead of assembly language, and the rendering is pretty much limited to library calls rendering sections of PNG files, the task becomes much, much harder. The build process obfuscated the code, changing names of variables and functions to one or two letters in order to reduce the output as much as possible. The number of classes was reduced to an absolute minimum because each class definition came along with a memory overhead. Some data files were shifted into a separate download package that the game downloaded when it first ran. Anything to get that initial download size down.
Compatibility was also an issue. The Java “write once, run anywhere” mantra is all well and good, but again the reality is somewhat different. Ok, a java game running on phone A would very likely run on phone B, but B may have a smaller screen, so needs tweaks to the menu or in-game screen layout. Phone C has slightly different button responses to be catered for. Phone D didn’t implement a particular base library function, or maybe it implemented it slightly differently. Phone E is extremely high-spec and needs a higher-resolution graphics set. Phone F has a tiny amount of memory and we need to cut animation frames. And so on, and so on…
On the plus side, it was great to get into a new language, Java – even the crippled implementation J2ME. We used Eclipse for our IDE, which I liked a lot. At the time, it seemed to have a lot more features, including a working autocomplete function, compared to the older versions of MS Developer Studio I’d been used to.