-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
registerWorldFormat for worlds with embedded tilemaps #4049
Comments
I don't think it's necessary to refactor the way Worlds work in order to allow you to import/export files like this. Rather than a custom world format, you can write a pair of actions for importing/exporting a world in your desired format. The import would create multiple maps (potentially writing them to files if desired), while the export would take the current world's maps and write them to a file as you need. |
Yeah if possible I'd prefer to work using only the game's file format. Preferably the Tiled world/map formats would be completely invisible to the mapper. |
Are there multiple layers per room? If not you could derive the room size from the each layer's contents. Alternatively, you could place rectangle objects to mark the rooms. I do think the suggested feature's would be nice to have, though I think it's quite an uncommon need. |
Yes, there's two tile layers and two decal layers.
Unfortunately the game has the ability to store entities outside of the room boundaries, so it's possible for an entity to have coordinates in one room but actually belong to a neighbour room; it wouldn't get loaded until the player enters the room it belongs to. It's probably going to be too difficult I think. |
I'm attempting to write a map import/export handler for a platform game that has rooms of arbitrary size that can be moved around. In Tiled this translates to a world with multiple tilemaps. Reading the Tiled documentation it doesn't look like worlds can have the tilemaps embedded.
The problem is that this game stores this data in one file per "world", and I can't see a way to write a
registerWorldFormat
that would then generate the world and all of its tilemaps in a single data structure (and be able to save that entire structure back to a single file).It would be great if tilemaps could be embedded in the world data, and if you could then register a file handler instead of being restricted to .world JSON files.
Although I could just load the entire world into one great big tilemap, it loses the ability to define room sizes.
The text was updated successfully, but these errors were encountered: