Problems caused by limited graphics memory with MIDP
Hi there.
I making a game using MIDP and my target phone only has 80KB available to graphics at runtime, so any mutable images I create cannot use more than 80KB (minus the space used by the other images in the game).
I'm working on a game that uses an image as the background. The image is created at runtime from coordinates read in from a file, and scrolls around during play as the player moves about. Now I've realised due to the available memory issue my background image can only only be slightly larger than the actual screen size at most, which is a bit poor.
Can anyone suggest an alternative to using a large image for the background? I've considered working out which area of the background would be onscreen at any one time, and just drawing that, but it would mean recreating the background for every frame, which would savagely effect performance.
Thanks for any help anyone can give me!
Can't you use tiles?
http://www.flipcode.com/documents/tilefaq.txt
http://www.genuts.com/api/tutorial/tiles/page3.php
http://www.gamedev.net/reference/articles/article728.asp
http://onesearch.sun.com/search/developers/index.jsp?col=devforums&qp_name=Java+Game+Development&qp=forum%3A406&qt=tile+games
shmoove
You're exactly right shmoove, the phone is MIDP 1.0It looks like I am going to have to do my own implementation of tiles but due to the nature of the game I'm going to have to be creating and destroying the same tiles all the time. Ah well, I'll give it a go and see how it pans
Actually, the N-Gage is a MIDP 1.0 device + MMAPI + Nokia extensions.
The MIDP 2.0 devices are starting to surface. Nokia has the 6600, 7700 and 6230. Sony Ericsson has the P-900 and I think a couple more. Motorola also has a few (I think around 5). Other manufacturers are also starting to come up with MIDP 2.0 devices, like the AlphaCell M-5.
The main problem now is not how many devices are out, but how much market penetration they have.
shmoove
It doesn't have to. The specs for MIDP 1.0 were designed with no transparency in mind (that's why there's no way to create a transparent mutable image, etc. in the API), but most phones do support transparent PNGs. To this day the only phone I have seen that didn't support transparency is the Motorola i85s (one of the very first J2ME phones). And using GIFs probably won't help.
shmoove