Whether you plan to save with global variables, scene variables, or saving instances…, and then choosing whether to go with GDevelop Storage or with the File System, I had made a template that should show you, generally, on how it would look like.
Template: GDevelop General Save/Load
.
.
The template includes:
I will update this post later one with more documentation and explanations.
GDevelop Storage
Global Variables
Scene Variables
Object Instances (Write)
Object Instances > Global Variables
Object Instances > Scene Variables
File System
Global Variables
Scene Variables
Object Instances > Global Variables
Object Instances > Scene Variables
.
.
Disclaimer: The template is saving and loading the x/y of objects and of instances. You should not use this template verbatim but as a example of what types of conditions or actions to use when starting a save system.
.
.
Examples to not use this template verbatim:
- If you want to save and load Score, Coin counters, Clicker-type variables
More often then not, you do not need to transfer variable values to other variables so therefore, you can skip a couple of steps of this template. - If you want to save Yarn Dialogue
This template is not entirely irrelevant as the principles still apply but you’d benefit more on using another template of mine: GDevelop Save/Load Yarn Dialogue and How To: GDevelop Save/Load Yarn Dialogue - etc…
Like I said, do not use this verbatim but as a guide. It will help you more if you see it this way ;D
.
.
Tip: It is always good to make a structure variable and store all the variables you want to save into it early on. As I like to say, if you even consider making a save system, always plan for it.
.
.
More resources:
GDevelop Storage Wiki: Storage actions - GDevelop documentation
GDevelop Save/Load Intermediate: Saving & Loading (Storage) - Intermediate Tutorial - GDevelop - YouTube
GDevelop Save/Load Advanced: Saving & Loading (Storage) - Advanced Tutorial - GDevelop - YouTube
GDevelop File System Wiki: File system - GDevelop documentation
GDevelop File System Expressions: Expressions reference - GDevelop documentation
GDevelop Save/Load Instances Template: GDevelop 5