Closed woutercommandeur closed 9 years ago
Good catch, I haven't tested the empty/build-your-own methods very well. Would you happen to have a small example of what you would normally do to build a map that I can add to phaser-tiled-tests and ensure that your case works well?
If not, I will fix this bug but you might encounter something else different later.
Well I just started out making them procedurally, I will try to make an example using the regular phaser tilemap api.
This would be the example using regular phaser tilemap
var map = game.add.tilemap();
map.addTilesetImage('tileimage');
var layer1 = map.create('level1', 40, 30, 32, 32);
var y = 19;
for (var x=10;x<30;x++) {
map.putTile(0,x, y, layer1);
}
Cool I'll put something together soon. I'm busy this weekend, but hopefully I can have something in next week.
Thanks!
Ofcourse this is the most minimal example, I will be using more features of tiled procedurally :)
Been pretty busy lately with other projects, and have been taking some time off for the holidays. Hopefully I can revisit this project here soon as I spend more time on something that is using it.
Just wanted to give an update and say hang in there!
It's ok, I have little time to work on my project atm anyway.
I would like to not use tiled to build my tilemap but use my own procedural generator hence I do:
game.add.tiledmap();
this fails because the check for data === null fails after the parser. it returns undefined instead of null. The getEmptyData function in the parser that is called causes this. It builds a map object but that object it not returned from the function.
Hope this is clear enough.