Custom extensible file format for 2d tiled maps
- by Christian Ivicevic
I have implemented much of my game logic right now, but still create my maps with nasty for-loops on-the-fly to be able to work with something. Now I wanted to move on and to do some research on how to (un)serialize this data. (I do not search for a map editor - I am speaking of the map file itself)
For now I am looking for suggestions and resources, how to implement a custom file format for my maps which should provide the following functionality (based on MoSCoW method):
Must have
Extensibility and backward compatibility
Handling of different layers
Metadata on whether a tile is solid or can be passed through
Special serialization of entities/triggers with associated properties/metadata
Could have
Some kind of inclusion of the tileset to prevent having scattered files/tilesets
I am developing with C++ (using SDL) and targetting only Windows. Any useful help, tips, suggestions, ... would be appreciated!