• Advertisement
Sign in to follow this  

Loading from a Map Editor

This topic is 709 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm working on a game and I'm exploring possible ways to load data from a level editor into my game. Specifically, I'm using LibGDX to create the game, and Tiled to design the levels. I'm also going for a component-based approach - each entity added to the map in Tiled has a "components" key in the properties, which specifies a comma-separated list of files, each containing serialized component data. When the level is loaded, it loads all of the necessary files and copies the components (because I can't give the same deserialized components to different entities) to the entities that need them.

 

I'm also using YAML to store the serialized components at the moment, but I plan to switch to JSON. Despite this, I feel like there could be a less-convoluted way to achieve this. What other methods, if any, could I use to load a level and supply components to entities? Or is the method I am currently using okay?

Edited by deryllium

Share this post


Link to post
Share on other sites
Advertisement

What problem do you have with it? Having an intermediate XML/YAML/JSON representation or annotation is common. I don't quite understand the point with the deserialized components to different entities - they get instances of the same components, they cannot really get the same component. Perhaps they should? I see nothing being obviously wrong here.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement