c-andrews Posted November 21, 2014 Share Posted November 21, 2014 Hi, I've just started using Phaser and its great. Theres lots of tutorials and lots of answered questions. But now i've hit a bit of a wall. I would like to try and use an Atlas with a TileMap (built using Tiled) and cant seem to find any information on it. I am using an atlas because my graphical assets are all different sizes, well apart from the floor tiles. Here some code:preload : function () { this.load.tilemap( "level", "assets/tilemaps/level.json", null, Phaser.Tilemap.TILED_JSON ); this.load.atlas( "scenery", "assets/sprites/scenery.png", "assets/sprites/scenery.json" );}create : function() { this._map = this.game.add.tilemap( 'level' ); //this._map.addTilesetImage( 'ground', 'ground-tiles' ); this._backgroundLayer = this._map.createLayer( "ground" ); this._backgroundLayer.resizeWorld();} This is just using one image with the key "ground-tiles". But now my map need collidables and trees etc. Can anyone tell me how or if i can use an Atlas with my Tilemap? Thanks Link to comment Share on other sites More sharing options...
Recommended Posts