phaser-ce
phaser-ce copied to clipboard
parseTiledJSON error when using Tiled "Collection of images" tileset.
In this case map.tiles
is empty because there is no tileset image and each tile has it's own. Code crashes at sid = map.tiles[tile.index][2];
in the same time map.imagecollections
is ok.
"tilesets":[
{
"columns":0,
"firstgid":1,
"grid":
{
"height":1,
"orientation":"orthogonal",
"width":1
},
"margin":0,
"name":"test",
"spacing":0,
"tilecount":7,
"tileheight":302,
"tiles":
{
"0":
{
"image":"chest.png",
"imageheight":200,
"imagewidth":200
},
"2":
{
"image":"coopers.png",
"imageheight":172,
"imagewidth":222
}
}
}
]
Thanks. What's the error message? Did it ever work in a previous Phaser version?
@samme error message is Cannot read property '2' of undefined
in line i described above.
Also what exactly is a "Collection of images" tileset?
I guess we don't support a "Collection of images" type.
I can add a warning message.
@samme you are right. Is this hard to support that kind of tilesets?
I'm not sure how much work it would be to add it. Hopefully someone with some knowledge can pick it up.
I have the same issue. I'm going to try develop the missing part of the code and if I make a good stuff I will push my work (not sure because I just start learning javascript).