Jump to content

[1.1.6] Doing a tilemap with a CSV?


Recommended Posts



I'm trying to do a tilemap with a .csv, and I have two questions.


1- In my code I have "game.load.tilemap('map', 'map.csv', null, Phaser.Tilemap.CSV);", and I get an error: "Uncaught SyntaxError: Unexpected token , phaser.min.js:11 c.Loader.jsonLoadComplete _xhr.onload". If I comment the load.timemap line, the error is gone. Am I doing something wrong?


2- Then, how should I display my csv map? I used a JSON code example that I tried to adapt. Is it correct?

var map = this.game.add.tilemap('map');map.addTilesetImage('tiles');        var layer = map.createLayer(1);layer.resizeWorld();

Thanks for your help!

Link to comment
Share on other sites


  • Recently Browsing   0 members

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