Youle Posted July 7, 2014 Share Posted July 7, 2014 I'd like to create a procedural, randomized level,Is it possible to create a tilemap with Phaser with an object or array (not JSON) ?Could I create my own Phaser.Tilemap by pushing Phaser.Tile on tilemap.data array ?Thank you Link to comment Share on other sites More sharing options...
lewster32 Posted July 7, 2014 Share Posted July 7, 2014 Yes, this is perfectly possible (and preferable) through your first method, and in fact the Tilemap loader supports this directly: http://docs.phaser.io/Phaser.Loader.html#tilemap Just pass the second parameter as null, and the third parameter as your object. Youle 1 Link to comment Share on other sites More sharing options...
Youle Posted July 7, 2014 Author Share Posted July 7, 2014 That sounds really nice I give a try and come back to conclude (or not)Thank you lewster32 1 Link to comment Share on other sites More sharing options...
Youle Posted July 7, 2014 Author Share Posted July 7, 2014 Actually I tried : function create(){ this.load.tilemap('tilemap', null, e)}e is a copy / paste of json file used in Phaser examples and I just get :GET http://localhost/potential-game/[object%20Object] 404 (Not Found) Link to comment Share on other sites More sharing options...
Youle Posted July 7, 2014 Author Share Posted July 7, 2014 My mistake, it works, thank you once lewster32 !! lewster32 1 Link to comment Share on other sites More sharing options...
Recommended Posts