Math Blog

This week, I decided to continue working on polishing the save system to be able to handle more complex data and store more of the player’s progress. To do this I once again had to use Data serialization and Statistics (Standard: Data, Statistics, and Probability) in order to add even more to the player’s save. This time, I added the framework for the players’ unlocked weapons, resources in their inventory, and progress within quests to save to the JSON file made 2 weeks ago.

(The datalist that allows the player’s quest progress to save, pictured in the code)


(The datalists that store the unlocked main weapons, secondary weapons, and resource inventory, respectively)


Along with adding the shown data to the save system, I also expanded on the versioning that was added last week, this time adding code to be able to check whether an existing save is compatible with the current game version. To do this I needed to use Boolean Algebra (Standard: Algebra and Functions), to be able to determine whether a function should return true or false after comparing the last compatible version of the save and the current version of the game to eachother.

(The function and boolean statement that checks whether the save is up to date or not)

Posted in

Leave a comment