Persistent Data - Load and Save Game States

This chapter focuses on persistent data and serialization generally; specifically, this is about saving and loading information to and from files, whether human-readable text files or encrypted binary files, both online and offline. This process has two especially important functions for games: firstly, save-game states allow the player to save and resume their progress in-game, and secondly, Data Driven Design (DDD) lets developers store huge databases (such as weapon and player stats) in text files and spreadsheets to drive gameplay elements. The first use case interests us here for Dead Keys, allowing the player to save their progress as they move through levels. Let's get started.

Get Mastering Unity 2017 Game Development with C# - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.