Saving and Loading




Saving and loading has just been implemented. When you create a save, you can rename them to any string of text you would like. Created saves are then taken through the character creation menu, and the player will need to save the game at some point before quitting to maintain the new save. When loading from the main menu, the game will open to the spot where the player saved. Data that are maintained when saved are as follows:

  • Player data:


    • Details about coloration, name, clan.
    • Character position
    • Inventory items
    • Equipped items
    • Learned recipes
    • Active quests
  • NPC data:
    • Position
    • Last requested item and quantity
    • Previous question posed in dialogue
  • Time:
    • The current time is saved, then time will be recalculated based on it. Takes a minute to update in the menu.
  • Tile set: This is where the real doozy lies. The tileset has a custom node for every single tile in the game with data associated (this is what you see when you right-click a tile and inspect). It also has every plant's data in a dictionary in this node. Data that are saved and loaded:


    • Tile data, including a huge list of information such as sprite sheet and atlas coordinates.
    • Every plant is saved then reinstantiated upon loading.
    • This process takes the most computation time and is the reason why "saving game..." last ~8-9 seconds. In the future, I will rewrite this code in a faster language but once I do that the game will not be playable in browser, so I want to maintain that as long as possible. 

Files

Save-Load-Linux 25 MB
66 days ago
Save-Load-Windows 28 MB
66 days ago
webapp03-05-24.zip Play in browser
66 days ago

Leave a comment

Log in with itch.io to leave a comment.