Hello!
I’m currently developing a mini-game engine (algostorm) for a small roguelike I’m trying to make. I want to add support for the Tiled JSON map format and I actually want to be able to define my entire game in tiled maps using custom properties, so I can use the .json map as a single saved-game-file.
However, some meta-data about the game (such as timers that have a type and an int property “remainingMillis”) is hard to save in Tiled using the tmx/json format, because that would be an object inside an object-group, but doesn’t physically exist in the game (doesn’t have an x and y / width and height / gid). I’d suggest to make it possible to add objects (using the same format as before), but to make the x and y optional attributes - and not imperative - (as far as I know, gid / width / height are optional), because this would easily allow to include meta-data about the maps as well.
I could just ignore the x/y attributes and keep the timers like that anyway, but it just seems wrong to me. This change would be compatible with previous versions of the format, but more flexible for this type of use-cases. I don’t know how much effort it would require to implement, but it doesn’t seem too complicated.
An alternative solution would be to allow object property types (because then, such composite meta-data could be saved in map properties instead of a “timers” object-group), but I think that would require a lot more effort and still wouldn’t help with grouping the meta-data logically (everything would be thrown in the map properties, instead of having an object-group for every type of meta-data).
I don’t know if this suggestion fits what you actually want tiled to do or if you will implement this or not, but it seems like a nice thing to have for the given use-cases of encoding meta-data.
Good job for what you’ve done so far!
EDIT: on the same category of suggestion, if the x, y, width, height properties on a layer can’t be changed in Tiled Qt, wouldn’t it be better to make them optional when saving the map?