A save system that would save all of your game, and when app closed reload the save?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By InstelGames
:warning: Old Version Published before Godot 3 was released.

Is It possible to add a script for a save system that would not be connected to a scene, and you could call the save function from any scene?

And to make it so when you reopen the game all of your progress would load?

ex: I finish a level, then you are sent back to the level select page. You close the app then reopen it and all of the levels you have completed would load?

:bust_in_silhouette: Reply From: Zylann

It all boils down to saving variables in a file, and reading them back when the game starts (for example, in the first scene, or using an auto-load singleton).
What these variables do to your game is up to you: it can be a list of completed levels, high scores, or more detailed information using dictionaries and arrays.

Loading and saving variables has been covered in many existing questions:
https://forum.godotengine.org/9978/how-do-you-make-save-game?show=9978#q9978
https://forum.godotengine.org/6491/read-%26-write?show=6491#q6491
https://forum.godotengine.org/7764/save-load-directory?show=7764#q7764

And the documentation has a section for saving games.

eons | 2017-04-11 11:29