🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Good day and welcome to day five

Published July 23, 2004
Advertisement
Day five of The J2ME Project That's Name Cannot Be Spoken (no, really, I signed the NDA yesterday). It's gotta run on a Nokia S30-series phone, which has a mind-numbing 32k of available heap. The code is based on a game that's already completed, so I've at least got the advantage of learning from other people's mistakes. One of the mistakes was. . .

Do not write for a more capable phone and then expect that code to work on a less capable phone.

They did their initial coding for the S60-series phones which have a luxurious 1 megabyte of heap available. Once they got to the S30 phones, however, they found that programs that do a lotta dynamic allocation just don't work on smaller platforms. It neither has the space nor the processing horsepower to maintain a lot of objects, so they had to flatten the app from several dozen game objects down to about five big ones.

Since I'm starting on the small platform, the later up-port should hopefully be much easier. Had a funny conversation with one of the technical managers on Tuesday:

Him: You can't have many objects on these little phones and as little dynamic allocation as possible.

Me: What's the minimum number of objects necessary anyway?

Him: Well, let's see. You need three static objects at least. One for the MIDlet, one for the display, and one to handle the events for the game objects.

Me: Okay, I'll do the game with three static objects. I'll just put all the game code in the event dispatching object.

So now that I've said it, it's gotta be done. We'll see how it pans out.
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement