Greetings everyone.
I’m currently making a simple 2d tile based game engine in java. My map is stored as an array of tiles ingame and I am looking for good ways to save this data to a file. I have considered the following:
- Saving to a text file by tile ID. This has the weakness of being easily edited by the player.
- Serializing. From what i’ve heard this is easily broken if any changes are made.
My questions are: What would be a good way to store data(like the tilemap) in a file? Could any of the listed problems be avoided?
Any suggestions and help for a rookie like me will be greatly appreciated.