Hi,
I'm trying to create my own tile map game (not using the other tool, TMX one, since I need to generate my maps procedurally, and they have 3 spatial dimensions). I'm using 32x32 tiles, using a pvr.ccz sheet, and sprite frames to create the sprite textures.
When I have much more than one screen's worth of tiles (and no tiles behind them - I only draw one layer of tiles at a time), I notice a slowdown on the ipad 2. As I increase the size, it goes slower. I have been able to minimise a lot of the fps slowdown by removing off-screen tiles from being children.
Am I missing something in terms of optimising speed without removing off-screen children? I looked at this tutorial:
http://www.raywenderlich.com/1163/how-to-make-a-tile-based-game-with-cocos2d
and seems to me that that program would have off-screen just as many tiles as mine, if not more, yet no slow speed was reported in the comments that I noticed. Is something happening behind the scenes that's not shown there (or something obvious I missed in the code)? I haven't tried running it, so I don't know how smooth it does actually run.
Needless to say, it would be easier and smoother experience for the user if I didn't need to remove off-screen children :)
Essentially, I'd like to know if there's a way to manage these things without removing off-screen tiles, and if not what is a sensible way to remove off screen tiles? (I don't like my current solution, since there's a delay in the tiles showing up as the user scrolls around).
Thanks