Closed max-vogler closed 1 year ago
@max-vogler Thanks for the issue! Definitely unexpected
Is this the margin you're setting in Tiled?
Yes, exactly! Excuse the short bug report without code/reproduction. My problem was solved after re-doing the tileset without margin and I don't see margin being used in the plugin code.
Hopefully a quick fix 🤞 I distinctly remember writing this type of thing for spritesheets in the main repo
@max-vogler Think I've got this figured! Excalibur uses the same words as Tiled for different things haha! Also we were note interpreting Tiled's concept of margin into Excalibur.
Hey thank you so much for the quick fix, love the fast turnaround time! I left a short comment in https://github.com/excaliburjs/excalibur-tiled/commit/0fe3031cfa37f16e42221519095bf84a1b00c9f4#r120139294, because I think there might still be a bug related to applying Tiled margin on the right and bottom side, which is not captured by Excalibur's originOffset.
Steps to Reproduce
Import a Tiled map using a Tiled tileset loading a single image with a margin (e.g. 8 pixels of blank space around the tiles, don't confuse with spacing between the tiles).
Expected Result
excalibur-tiled should load the tileset correctly.
Actual Result
excalibur-tiled loads the tiles in a garbled way, some are transparent, some are the wrong tiles.
Environment
Current Workaround
Creating a new tileset in Tiled without margin works.