Hello There,
This is Özden Irmak from Klik! Games who successfully released 2 games on AppStore in the past months using another programming language and now moved into Objective-C after the 4.0 TOS. I was already following Cocos2D since it always seemed a good effort for a solid 2D framework for building IPhone games. Now, for our next game, "FastBall 2", I decided to use it. It's pretty nice overall, though some low level things are hidden but that's the case of having a framework right :).
In our game, tilemaps are the core of the game and I see some serious problems with it so wanted to understand the reasons of it.
1) I've read in some topics that TileMaps always draw all their elements, even when they are out of the screen which doesn't need to be drawn, why? This is something the first rule of graphical drawing optimization, "don't draw anything that doesn't need to be". In that case, even breaking a big tilemap into some small pieces won't work unless you make them very very small. Is there any technical reason that it has been done so?
2) I'm trying to load a tilemap with a size of 250x25 and it crashes, but if I use 250x20 it seems ok. Is there such a small limit in tilemap size? In the docs, this part is pretty vague so I could not understand the amount should I stick.
For the 2 issues above, without any magical trick, I could get healthy results with my own coding before in the other language I mentioned. All the drawings were counting the current position of my tilemap so I was only drawing the needed items within the screen bounds and tilemap is more or less a simple array pointing to an image resource to be drawn and could be populated without a big memory impact to cause any crash.
I would be glad if anybody could enlighten me in these matters...
Thanks in advance...
Özden