Best way to make a save and load system for 3D game

Godot Version

4.5

Question

What is the best way to make a save and load system? Since I don’t know anything about it, I tried looking up a tutorial, and every tutorial I’ve found is either not what I’m looking for, made specifically for 2d, or just broken.

There’s no “best way”. It’s highly dependent on your game and data needed to store/recover its state.

3 Likes

A save system isn’t specific to 2D or 3D. You could still use a save system that used 2D nodes in the demonstration.

3 Likes

Let me rephrase that: What is the best way to approach creating a save & load system?

Start by cataloguing every piece of data that constitutes your game state. Make an object (or multiple objects) that can collect and hold that data, as well as push that data back onto the game to restore the state. Once you have that, pick the best way to load/save that object from/to the hard drive and you’re done.

2 Likes

Start by either following the tutorial in the Godot docs or another one on the net.

Or use one that someone turned into a plugin like this one: Disk It’s lightweight, easy to use, and well-documented. (I should know, I made it myself.)

4 Likes

As others have pointed out, there is no single best way. It depends on what exactly you want to store, how often, and in what form.

In my games, I use a simple system where all data defining the game state is kept in a single Dictionary, which I then save to a file using the store_var function and restore from the file using get_var.

It appears that my video tutorial on this topic is two years old and doesn’t explain all the details. I’ll try to record a new one soon.

4 Likes