I just finished implementing an automatic texture sheet system for iPhone Plasmacore. By default it automatically places image textures onto a single 1024×1024 texture sheet, creating additional sheets if you run out of room. In addition I’ve transparently buffered all drawing calls, so drawing 50 images will just store up 100 triangles and then render them all at once later.
There’s significant speed-up over my previous implementation, but you’ll still have to be careful. The results:
- I altered the system to redraw at 30 fps instead of 60. Even a blank screen can’t quite hold steady at 60 fps, so I’d rather aim for a steady 30 fps on iPhone. No changes required to your Plasmacore programs.
- iPhone Plasmacore can draw about 9280/x square images in 1/30 second, where x is the size of a single dimension of the image (16 px or higher; smaller images are roughly the same). [Edit: make that "9280 / sqrt(x)" where x is the number of pixels per image]. So around 580 16×16 pixel images, 290 32×32 images, or 145 64×64 images.
- Sound effects will probably slow it down a bit more; I need to do some further testing with that.
Looking good for modestly complex games!