Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tiled 1.9.0 introduces breaking changes in JSON map format #2352

Closed
6 tasks done
moufmouf opened this issue Jun 27, 2022 · 2 comments
Closed
6 tasks done

Tiled 1.9.0 introduces breaking changes in JSON map format #2352

moufmouf opened this issue Jun 27, 2022 · 2 comments
Labels
bug Something isn't working enhancement New feature or request
Milestone

Comments

@moufmouf
Copy link
Collaborator

moufmouf commented Jun 27, 2022

The release of Tiled 1.9 introduced breaking changes in the JSON map format:

https://doc.mapeditor.org/en/stable/reference/json-map-format/#tiled-1-9

This has an impact on WorkAdventure maps since any map written with the new Tiled version won't work correctly (mostly for areas and variables as the way "objects" are stored has been modified).

We need to adapt WorkAdventure for this change while keeping compatibility with the old format.

Proposition:

  • Upgrade https://www.npmjs.com/package/@workadventure/tiled-map-type-guard to be able to read the new properties (and mark the "type" property as deprecated if possible)
  • Build a utility function (in tiled-map-type-guard ?) to copy properties from "type" to "class" and from "class" to "type"
  • Anywhere in the code where we read the "type" property", use "class" instead
    • in front
    • in back
    • in scripting extra
@moufmouf moufmouf added bug Something isn't working enhancement New feature or request labels Jun 27, 2022
@moufmouf moufmouf added this to the v1.11.x milestone Jun 27, 2022
@bjorn
Copy link

bjorn commented Jun 27, 2022

Until the map reader supports the "class" property in addition to the old "type" property, your users can also use the new "Compatibility Version" option in the Tiled project:

image

When set to Tiled 1.8, the "type" property will be used when saving.

@moufmouf
Copy link
Collaborator Author

Hey @bjorn ,

I just realized that and was writing about it but you beat me by a few seconds.

Thanks a lot for the tip! (and thanks for Tiled!) ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants