Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
AS far as I Know the CCTMXTiledMap is not designed for big maps, it 's very slow. – Raspu Jun 15 '12 at 20:10
Consider breaking your map up into smaller maps that connect with each other. – dqhendricks Dec 28 '12 at 0:32

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.