The player can now save and load their game! :tada:
When a player is in-game, they can click the Save Game button from the Main Menu. This will serialize the game state into JSON and save as a .txt file to a saves directory. From the Title Screen, selecting Load Game will put them right back where they left off.
This addresses Issue #10.
I hunted around for as many bugs as possible, but I'm sure there will be more found in the future.
Code Changes
Global controller added with logic for saving and loading state to/from disk and other necessary functions
Scene controller updated with a new loadSceneController to handle updating the scenes from a loading state
New scene-load partial to update requisite elements
Title screen updated to conditionally allow the Load Game button pending if a save file exists
Scenes are now passed globalState when rendering
Saves directory added with gitignore for contents
Bug with JSDoc types fixed
Inventory Menu's Use Item button conditionally disabled based on load state with selected item
Description
The player can now save and load their game! :tada:
When a player is in-game, they can click the Save Game button from the Main Menu. This will serialize the game state into JSON and save as a .txt file to a saves directory. From the Title Screen, selecting Load Game will put them right back where they left off.
This addresses Issue #10.
I hunted around for as many bugs as possible, but I'm sure there will be more found in the future.
Code Changes