can not fill too many png in one tileMap layer

I meet some problems, as I fill more than 20000 tileset in one tileMap layer.

If the filling size is not too much, it seems normal.
I append some log on CCTMXLayer::setupTiles()
Cocos2d: cocos2d: CCSpriteBatchNode: resizing TextureAtlas capacity from [14001] to [18669]. Cocos2d: CCTMXLayer->m_pAtlasIndexArray->num: 15099

But, if I fill 40000 tileset, full of the tileMap. The png picture is invisible on the XCode simulator, as I am not filling anything in the layer but the truth is that full png picture in the layer.
The log on CCTMXLayer::setupTiles()
Cocos2d: cocos2d: CCSpriteBatchNode: resizing TextureAtlas capacity from [14001] to [18669]. Cocos2d: cocos2d: CCSpriteBatchNode: resizing TextureAtlas capacity from [18669] to [24893]. Cocos2d: cocos2d: CCSpriteBatchNode: resizing TextureAtlas capacity from [24893] to [33192]. Cocos2d: cocos2d: CCSpriteBatchNode: resizing TextureAtlas capacity from [33192] to [44257]. Cocos2d: CCTMXLayer->m_pAtlasIndexArray->num: 40000

Is that the limited filling png size in one layer by cocos2dx?
Any body can tell me why?


tileMap.png (292.5 KB)

looks like you hit the memory limit, you can slice up your map so it only loads what you need

Hao Wu wrote:

looks like you hit the memory limit, you can slice up your map so it only loads what you need

Thanks.

What part of the memory limit? The layer, or the whole tilemap ?

I make an other test. I create an new layer behind the problem layer. And I fill some png pictures in the new layer. This is normal, no problem. The pictures of the new layer are visible.

May be, cocos2dx make the memory limit in one layer, I guess. Buy Why?