I am writing a game engine using C++ & SDL2. I am currently working on generating game objects from a Tiled map, I am quite new to Tiled so I don’t know if the feature I am lookng for exists. The general idea is that in Tiled I will specify the components that an object has and my game engine could read the map file and generate the object I want. I was wondering if there is a way to create custom property types, so I could attach a component to an object by a single property (much like it is done in Unity).
For example, let’s say I want to attach a Transform component to an object, I could just add a new property of type Transform, then I could just fiil in each parameter that a Transform component needs.
I hope I was clear in my explanation, thanks to every one who could help me!
This is not possible yet, but it’s one of the things planned for Tiled 1.6 (I’m currently finalizing 1.5):
For now, the way to do this is with strings, since you can include multiple values in CSV or JSON or any other notation you like. Using the Object Type editor, you can even pre-fill these values with defaults to make putting this data in easier.
That sounds great, I can’t wait for this new feature.
I will use strings for now.
Thanks for your fast response!