Jump to content

Tilemap not rendering


Recommended Posts



I'm dynamicaly creating a cave and transform it in json to load it with tilemap.


Here is the json : http://tny.cz/04da6f7b


In my Preloader.js file

this.game.load.image('tiles', 'images/cave.png');

Note : cave.png is well loaded and is a 64x32 image.



And in my Game.js

create: function () {    this.game.load.tilemap('cave', null, json, Phaser.Tilemap.TILED_JSON);    var tileMap = this.game.add.tilemap('cave');    tileMap.addTilesetImage('cave-world', 'tiles');    var layer = tileMap.createLayer('cave_walls');    layer.resizeWorld();}

Nothing appears on the canvas, and don't know why, no warning or error in JS console.


Here is what it looks like when manually rendered :



Thx ;)

Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...