Is there a way to save the game in a paused state

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

I am making a platformer game. I want to be able to pause the game and save it exactly where the pause happened. Does anyone know if this is possible, and how it would be done?

:bust_in_silhouette: Reply From: Hinsbart

Take a look at the save game tutorial. Basically you’d keep track of all the necessary object states (variables like position, health, whatever…) and save them to a Dictionary, which you can then write to disk as json.

Depending on the type of game, if you want the loaded game to behave EXACTLY like the save/load didn’t happen in the first place, you’ll have to save a LOT of variables.