The maps in moldering are stored as plain text files. This has its pros and cons. For one, it’s easy during development to make simple changes without the level editor. However, anyone can edit text files. So, rather than letting any Tom, Dick, and Harry edit the maps at their whim, I implemented some VERY basic map encryption.
Basically I serialized a class that stores all the maps after changing the maps to their hex representation. If anyone was planning to “break the code”, they’d figure it out anyway, but this will still prevent most people from cheating. By removing the temptation by one layer I think I improved the integrity of both the game’s maps, and completing the game; someone who says they beat the game likely did not alter the maps.
Besides, I do plan to release the level editor after some time, and with it the tools to pack and unpack maps. So, people will be able to edit the game and pack their own maps eventually. However, the officially released map packs will be that much more unalterable, and people won’t easily cheat or accidentally break the game.
blog comments powered by Disqus

![[loading...]](http://www.projectmoldering.com/images/indicator.gif)