I am try to design a cocos2d game with a big world. The world's tile map is very big, maybe 20 iPad screen sizes worth of tiles.

I want to know how to load this using a CCTMXTiledMap? If I directly add it to screen, will it use too much memory? If so, is there a solution to solve this problem?

  • \$\begingroup\$ AS far as I Know the CCTMXTiledMap is not designed for big maps, it 's very slow. \$\endgroup\$
    – JP Illanes
    Commented Jun 15, 2012 at 20:10
  • \$\begingroup\$ Consider breaking your map up into smaller maps that connect with each other. \$\endgroup\$ Commented Dec 28, 2012 at 0:32

1 Answer 1


Although the comments suggest that CCTMXTiledMap will perform poorly under large tile maps, it's hard to say in general if that is going to be "slow enough" to be a problem for your game.

So I would advise you to simply try it first, and see if it works for you. If it does, you have a simple solution.

If it doesn't, you can usually solve this kind of issue by breaking up a large map into segments and loading those independently, keeping only the segment the player is currently on (and potentially the immediately-adjacent segments) in memory and unloading old ones (and loading up new ones) as the player traverses the map. This is the basic technique used to present large, apparently seamless worlds.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .