Playable build – updated
Save game system overhaul
Over the last week I have completely reworked the save / load system. Previously I was using Unity’s PlayerPrefs to save game state into, which was only ever a temporary solution. The PlayerPrefs are only intended for small amounts of player settings data, not for save games.
Now I serialize everything into a single binary file per save game (into a local “SaveGames” directory). This does away with the old fixed slot based system and allows you to name your save games and have as many of them as you want.
This works great for the standalone build, but the Unity web player doesn’t allow file IO for obvious reasons. So for the web player I tried saving the binary data into PlayerPrefs (much like I used to do with the old save game system). This works fine, however the .NET serialization I’m now using doesn’t seem to work in the web player (deserialization fails with a FieldAccessException for some reason). I don’t have time to look at this right now, so I’ve had to disable save / load in the web player for now.