TMX Maps & Retina Display

TMX Maps & Retina Display
0.0 0


Hi all

I’m having some issues trying to get TMX Maps to show in Retina Display mode. My general sprites work fine in both modes and the TMX Map works for standard size, however when the hd map is loaded everything appears twice as big on the retina display, instead of being the same equivalant size. Has anyone else tried this or am I missing something? Cheers!
Pseude code:
tmx = CCTMXTiledMap::tiledMapWithTMXFile(“alpha.tmx”);
tmxBg = tmx~~>layerNamed;
this~~>addChild(tmx, –1);

alpha.tmx (16x16 tiles)
alpha.png (16x16)
alpha-hd.tmx (32x32 tiles)
alpha-hd.png (32x32)


Found the same question here, see if it helps:


Cheers, but I don’t think this is the same issue. I literally just let cocos2d-x load the map and display it, but it doesn’t display correctly on the retina display, it is twice as big as it should be. Has anyone else managed to load and scale a map correctly on the retina display?


Just been trying to do Retina TMX tiled maps myself, can’t get it working in Cocos2d-x (v 1.0.0-x-0.9.0).

I’ve posted screen shots of the normal mode map being displayed (this is what the Retina one should look like too a tree and a bix X in front of the Cocos logo), the Retina mode map, and another Retina mode with a modified TMX file.

Editing my HD “map1-hd.tmx” file and changing all tilesizes to their low res value 32 (they should be 64 for my 64x64 tiles) I get a “better” looking result (see TMX_Retina_with_Tilesizes_32.jpg). Of course changing these values is actually wrong and stops it loading into Tiled editor.

Have also attached the progect source file, it is the Helloworld sample. You will see there is a “map1.tmx”, “map1.png”, “map1-hd.tmx”, “map1-hd.png” in the resources. And the only lines of code added are in “bool HelloWorld::init()” which are:

// Set retina display mode

(comment out that line to test low res mode on an iPhone 4) and…

// Load in the TMX tile map
CCTMXTiledMap* Map;
//Map = CCTMXTiledMap::tiledMapWithTMXFile(“map1.tmx”);
Map = CCTMXTiledMap::tiledMapWithTMXFile(“map1.tmx”);
addChild(Map, 0, 1 /*kTagTileMap*/);

Soooo… am I doing something wrong or is this a bug?


OK, found the problem and have a fix, see


how can i fix this bug?it’s still is a big bug