Handling Persistent Data

Alan Thorn · Apress eBooks · 2014

CMOD is looking good now, and we could improve it even further by adding more levels and environments, such as rooftop levels, basements levels, and even exterior levels. If we did that, however, it’d be useful for gamers to be able to save their games so that the next time they played, they could resume from where they left off, preventing them from repeating their actions every time. In other words, if we’re to expand the game, it’d be helpful for the gamer to have save-game functionality. Achieving this effectively means we’ll need to store game data persistently on the local computer, between playing sessions, so that even between powering the computer off and on, the save-game data persists to be restored. Thankfully, Unity and Mono offer a range of handy features and classes for handling persistent data, and these will constitute the focus of this chapter as we implement load-and-save game functionality for CMOD. So let’s go! These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Read the paper · More papers on PaperTik