I try to build map by using tiled map editor.
but I shoud have to see error message (“TMX: unsupported compression method”)
Tiled map editor default map setting was Base64/Zlib
but i didn’t know about that.
so.. I wasted about 1hour…… OTL
there are two way to fix it.
change layer data as Base64/GZip (edit~~>preferences)
or change the code.
I compared original cocos2d source with cocos2d-x
I found some missed code.
TMXLayerAttribNone = 1 << 0,
TMXLayerAttribBase64 = 1 << 1,
TMXLayerAttribGzip = 1 << 2,
TMXLayerAttribZlib = 1 << 4, // !
int layerAttribs = pTMXMapInfo~~>getLayerAttribs();
if( compression "gzip" )
layerAttribs = pTMXMapInfo->getLayerAttribs();
pTMXMapInfo->setLayerAttribs(layerAttribs | TMXLayerAttribGzip);
else if( compression “zlib”) //
layerAttribs = pTMXMapInfo~~>getLayerAttribs;
pTMXMapInfo~~>setLayerAttribs(layerAttribs | TMXLayerAttribZlib);
CCAssert( compression "" || compression “gzip” || compression == “zlib”, “TMX: unsupported compression method” );