A large percentage of cell phones include Java support through J2ME. Given that the most popular applications for cell phones are games, the ubiquity of J2ME sounds like a perfect match for a game developer to support as many different cell phones as possible.
John Carmack was the lead programmer at ID Software. He’s well known as one of the original developers of Doom and Quake. He was responsible for the game engines that pioneered the use of graphic techniques to allow limited platforms to smoothly render realistic environments. Carmack has recently been developing cell phone games in Java using J2ME. His experience has been frustrating:
It turns out that I’m a lot less fond of Java for resource-constrained work. I remember all the little gripes I had with the Java language, like no unsigned bytes, and the consequences of strong typing, like no memset, and the inability to read resources into anything but a char array, but the frustrating issues are details down close to the hardware.The biggest problem is that Java is really slow. On a pure cpu / memory / display / communications level, most modern cell phones should be considerably better gaming platforms than a Game Boy Advanced. With Java, on most phones you are left with about the CPU power of an original 4.77 mhz IBM PC, and lousy control over everything.
Even compiled to completely native code, Java semantic requirements like range checking on every array access hobble it. One of the phones (Motorola i730) has an option that does some load time compiling to improve performance, which does help a lot, but you have no idea what it is doing, and innocuous code changes can cause the compilable heuristic to fail.
Write-once-run-anywhere. Ha. Hahahahaha. We are only testing on four platforms right now, and not a single pair has the exact same quirks. All the commercial games are tweaked and compiled individually for each (often 100+) platform. Portability is not a justification for the awful performance.
I didn’t realize that J2ME performance was that crappy. And the game has to be tweaked for each platform? Wow.
I’ve run a few Java games (aka midlets) on my Treo. They run reasonably well with some moderate display glitches. But Java games tend to have a “least common denominator” UI and don’t take advantage of Treo features like a native Palm application would. And the Java VM for Palm needs 3.6 MBs of free RAM. That’s pretty painful on a memory-constrained device (although I guess this wouldn’t be an issue if it was already in ROM).
0 Responses
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.