MapEditor: Save as Serializable or XML

Hi guys

I have a TileMap class consisting of multiple Tiles. Those Tiles have properties and Events saved on them. If i want to save the maps, what format should it be? What are the advantages / disadvantages of serializing it? Same for a XML file… Are there better options if i don’t want to use TileD and co.? ::slight_smile:

Write each tile and its properties out to a bytebuffer, then write this bytebuffer to a file and when you write the file containing your entire map, zip it.

Always let editors write text files, not binary.
For shipping with games you can convert to whatever format, but while editing, text is much more convenient.

I’m assuming Half_NO_oB has a map editor with a GUI and the editor is using that to create the map.
(I dont know if your comment was directed towards me lol)

Did i get this right?

While editing the map I should work with text files and not serialize it? If I’ve finished a map i can either zip it or save it in any other format?

Almost. If you’re editing your map by typing directly into a file, keep it in a text file. Else, if you’re using a GUI to edit the map, it doesn’t matter because the code behind the map editor will do all the writing to a file for you. And yes, after you finish a map you can do whatever you’d like to it

if you’re looking for a simple solid xml/json converter i can recommend http://x-stream.github.io/

with it you could create something without “object” serialization. more a “description” of your saving/loading process. o/