saving using "GameLogic.globalDict"

If I use the game actuator to save my game, where is it saved? is it saved to a file (and if so, in which directory?) or only to the RAM, so it can only be loaded as long as the game is running?
thx in advance

First you have to put things in the globalDict, otherwise you save an empty file. And it does save it to file, I think you specify the path.
I don’t like using the globalDict for saving, as it won’t allow objects made with the “addObject” actuator to be saved or loaded properly.

how can i specify the path?

Adding objects has noting to do with saving and loading. You do not save complete game objects anyway. You save the state data of an object.
You need to do this in a way that you can restore this data at another object in another game run.

That measn there are always two separate steps:
storing + saving
loading + restoring

Loading: The loadActuator places the file content in globalDict only as each other file load processing does (Python).


  1. You need to identify the game object that belongs to the data to be restored.
    1a) If there is none, you can create one (AddObject).
  2. Restore the data at the object identified.

It does not matter if you restore the data from globalDict or somewhere else.

I hope it helps

As far as I know there is no way to tell the path or the filename.

The KX_GameActuator has a filename attribute. It is used for mode KX_GAME_LOAD.
I have no idea if that can be used for mode KX_GAME_LOADCFG as well. At least the GUI does not offer a field for it.

where is the file saved to then?

I usually find it at the blender folder with the name of the current blend.