elleniaw Posted March 12, 2018 Share Posted March 12, 2018 I'm not sure if this is a bug or expected behaviour: this.load.spritesheet('level_tm', 'level_tm.png',{ frameWidth: 32, frameHeight: 32 }); this.map = game.make.tilemap({ key: 'map' }); let groundTiles = this.map.addTilesetImage('level_tm'); this.groundLayer = this.map.createStaticLayer('Ground Layer', groundTiles, 0, 0); This creates a layout of the tilemap where the tiles are really small. Note that If I replace createStaticLayer with createDynamicLayer the result is as expected. Did I forget to specify the tileWidth and tileHeight somewhere? If so, why does it work for "createDynamicLayer" Link to comment Share on other sites More sharing options...
elleniaw Posted March 12, 2018 Author Share Posted March 12, 2018 I found a way to make it work: //changing this.load.spritesheet('level_tm', 'level_tm.png',{ frameWidth: 32, frameHeight: 32 }); //into this.load.image('level_tm', 'level_tm.png'); Fixed it. Though I still expect the first to also work (because for DynamicLayer it works fine - and I don't see why the first would be invalid) Umz 1 Link to comment Share on other sites More sharing options...
Recommended Posts