gdquest-demos/godot-open-rpg

Save and load

NathanLovato opened this issue · 1 comments

The Patreon supporters requested a tutorial about Save this month, so it's a good opportunity to add that to OpenRPG. As I've already covered JSON-based saves in the Godot course, this time around I'm looking to try a new approach, using Godot's Resources once again.

The idea is to have Resources and sub-Recourses that represent different entities in the game. For example a PartyMember resource that would hold, save, and load all the info related to a party member: level, experience, etc.

There's a bit of research to do there but the advantage of this approach is that you can delegate all the save and load operations to the resource instead of having it on every game entity you want to save (quest state, objects in the game world, etc.).

It's going to take a little bit of research and experimentation but it should work just as well as a plain JSON object, but unlike JSON it should allow us to edit save data from the editor/inspector.

Started work in the save_game branch. Waiting for some feedback from Nicholas to keep pushing the feature - but it kind of works already at this point: https://github.com/GDquest/godot-turn-based-rpg/tree/save_game