IWETHEY v. 0.3.0 | TODO
1,095 registered users | 1 active user | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New John Carmack on J2ME programming
[link|http://www.armadilloaerospace.com/n.x/johnc/Recent%20Updates|Cell phone adventures]

He is quite negative.

I have started working on J2ME and think things are not nearly as bad as he says. He claims that Java is really slow on cell phones. The fact is that things are getting better. Within the past year just about all the VM implementations on the phones have started to include a JIT which helps performance a lot. There is a 3D Graphics API which basically is a thin wrapper over native code, Java is not going to cost you much when you use it the overwhelming majority of the time will be spent in the actual native rendering code. Until now most cell phone chips didn't support floating point in hardware, meaning that all the calculations are done in software, when you do 3D graphics that is painful. Most phones didn't have hardware video accelerators again painful for 3D graphics. This is also starting to change. I have seen some very cool 3D games on high end Japanese phones that perform fine. A lot of it is a question of hardware.

These are the minimum requirements for a MIDP device:

256 kilobytes of non-volatile memory for the MIDP implementation, beyond what\ufffds required for CLDC.
8 kilobytes of non-volatile memory for application-created persistent data
128 kilobytes of volatile memory for the Java runtime (e.g., the Java heap)

As you can see that the Java VM implementation is given 256K, the memory allocated to a Java app is 128k, to get a 3D game running in that space is a feat in itself.

Expand Edited by bluke March 31, 2005, 03:04:59 AM EST
New J2ME programming
Although the underlying language is Java it is a completely different mindset. The focus is on size and then performance. Given the tiny heap size this makes sense, but it requires a different mindset. Regular OO techniques that you would use are thrown out the window to save time or space. People leave out setter and getter methods and make members protected or public so that they can access them directly for both better performance and code size. You have to really think twice before introducing another class or interface, every extra class takes up space. Even the underlying API's are written like that. It is OO in name only.

I have always been a big OO guy, I hope that I can adjust to the mindset.

Hopefully Moore's law will work it's wonders here as well, already I am seeing devices with a 2MB heap which is a huge step up.

New His expectations may be different than yours
After all he's been pushing the envelope on game performance for years. Very few people are going to be as aware as he is of exactly what hardware is capable of, and what would make it get there.

Cheers,
Ben
I have come to believe that idealism without discipline is a quick road to disaster, while discipline without idealism is pointless. -- Aaron Ward (my brother)
     John Carmack on J2ME programming - (bluke) - (2)
         J2ME programming - (bluke)
         His expectations may be different than yours - (ben_tilly)

I didn't tell you that it was good! I told you that it was interesting.
40 ms