-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
TiledMap can be loaded only in xml format and not json. #7291
Comments
Hi, I'll try to add it. |
Hi @patton73, I'm not sure to fully undestand what you mean by having in the loader a method to load a defined Tileset file directly into a TiledMapTileSet. Isn’t it already the case with the TmxMapLoader, which loads a map with the associated tilesets from the given file? |
Hi @Kevin-Garnier thanks for the question. According to me this is a cool upgrade to the library. Thanks anyway for your effort. |
@patton73 right now you can load an empty map references those tilesets and use them to generate your maps : About JSON format, i'm not sure what the benefits using this format but assuming you get a tilemap/tileset from someone else, you could re-export them as XML from Tiled. I can understand that it could be nice to have full support at some point but those are easily workaround-able until then. |
@mgsx-dev I agree with you that loading json format is a good surplus but not a priority. |
@patton73 actually you can load TMX maps with libGDX which has separated TSX files, in this case tilesets are not embeded into the TMX map, it only references them. So your code doesn't need to know if tilesets are embeded or referenced by the tilemap, which could be a plus in term of assets organization for some people. That said, i can understand it could be more handy for some people to directly load TSX files, no doubt. |
I've already done the json format on my fork, I can do that too |
@Kevin-Garnier : I saw you opened a PR with some Tiled enhancements which is great. Can you please also include a fix that the loader does not crash with properties of type file? It crashes in a castProperty method of the loader because it does not support that type. Imo it should not crash and simply load it as a string (no cast necessary). Also, imo text objects are also not loaded correctly. They don't contain any of the text properties that Tiled stores. If you have time and motivation it would be great if you can add the support for this as well |
Basically this is a request for new features.
I would like to have the chance to load a map in json (.tmj) format from TILED. Right now only .tmx formats are loaded.
More i would like to have in the loader also a method to load a defined Tileset file (both formats as well) directly into a TiledMapTileSet.
Thanks a lot for your efforts.
Keep up the incredible good work.
The text was updated successfully, but these errors were encountered: