PBS-KIDS / Platypus

2D tile based game framework in HTML5
128 stars 30 forks source link

Tiled importing #24

Open gbhkit opened 6 years ago

gbhkit commented 6 years ago

Hi there, Just wanted to jot down a few things I noticed with how Tiled (1.1.3) and Platypus (0.11.9) were working together:

  1. "Image" layers in Tiled don't appear to import automatically
  2. Tilesets that use non-uniform-sized tiles (made as "collection of images" in Tiled) do not import automatically (assumption is uniform sized tiles).
  3. If collection tile sets ARE used in Tiled (for placement purposes), subsequent tile sets get thrown off (I think due to gid mismatch). I've worked around it by manually adding values for imageheight, imagewidth, tileheight, and tilewidth in the collection tileset, in a way that corresponds to the number of tiles in the collection - so that Platypus will use those values to account for the collection's tiles.
  4. Layer groups in Tiled are not supported
  5. Images (tile images) placed in objects in Tiled don't appear to show up automatically

There was also one very interesting apparent bug, which I'll post separately.

These things can be worked around easily enough, but I did want to make a note of them in case any of them are either a) fixed already, b) about to be fixed, or c) fixable and should be added to future updates. Or d) not going to be fixed, but should be documented as gotchas.

probityrules commented 6 years ago

Thank you for this!

We have a few Tiled updates to roll back into Platypus in the near future, including support for points and the new v1.2 JSON format for properties, but 2-5 are good to have on our radar as needs for future updates. (PR's are welcome for any of these as well.)

Number 1 above should already be supported. You may need to include the image in the list of game assets to make sure it loads, but the layer itself should render just like tile layers. If that's not working for you, it may be a bug.