cocos2d / cocos2d-x

Cocos2d-x is a suite of open-source, cross-platform, game-development tools utilized by millions of developers across the globe. Its core has evolved to serve as the foundation for Cocos Creator 1.x & 2.x.
https://www.cocos.com/en/cocos2d-x
18.24k stars 7.06k forks source link

[TileMap]Even each tileset only have one image,still can't show correctly.(withTestCase) #16670

Open zloop1982 opened 8 years ago

zloop1982 commented 8 years ago

Steps to Reproduce:

  1. try to load tiled map attached here:tilemap.zip

    use this code :

    var map = new cc.TMXTiledMap(res.map_tmx); this.addChild(map, 2, TAG_TILE_MAP);

  2. run the game in browser.

NOTE: in this map , each tileset only have one image. but have 8 tilesets.

tilemap.zip

zloop1982 commented 8 years ago

Is there an limitation "one layer only use one image"? Or, "one layer only use one tilesize"?

I split the metal,rock,wall in different layer, and then, seems better.

zloop1982 commented 8 years ago

finally set every tielset's tilewidth and tileheight to 64 as the map set , get correct result.

stevetranby commented 8 years ago

yeah there's definitely a one tileset per layer limitation in the cocos2d tilemap renderer