Save/Load game script?

I am making a 3D puzzle game with Blender, and I was wondering if there was an easy way to save/load the game? Each level has multiple stages, and there is a loading screen between each stage. I want to have the game autosave on each loading screen, so when the player clicks “Load Game” on the Main Menu, it will automatically return to that loading screen and gameplay continues from there. There is no scoring system in the game, so no need to worry about that. Here is the .blend file:

If anyone can help me get this important feature working, I would appreciate it. Thanks!

EDIT: All the script needs to do is be able to return to a specific scene when the load game button is clicked (for example, the last save was on the scene titled “loading 1-5”. The player hits load game and it returns to scene “loading 1-5”.)

I don’t want to sound rude, but seriously?! I know it can be done! Can nobody give me a script to save the last accessed scene and return to it when the Load Game button is clicked??

search the resource forum

What resource forum? I don’t understand…

If you look at the top of this page you can notice you are in the Game Engine subforum with the Game Engine Support and Discussion sub-sub-forum. If you navigate up you will find a Game Engine Resources sub-sub-forum.

There you can find plenty of resources where you can look how to do things. Some of them are ready to use. Some of them are just ideas. I’m sure you will find quite a lot of threads dealing with save/load.

You can even find threads in this forum. This threads mainly deal with issues, but can offer solutions too.

I searched the resource forum, but I can’t really find anything that is what I need. All this needs to do is remember the last scene accessed, and return to that scene when the load game button is clicked. I don’t want to sound rude, but I’ve seen your other posts and I know that you know how to do this, so couldn’t you please just post the code in this thread? It would really save me a headache.

Each time when you enter scene save a property with that scene id. When loading game, check the property ans set the scene according to loaded number…

T he main reason that this forum stays active and alive is that there are always new people learning, and able to later pass on information that they learned from others. It is far more effective to learn through experience than reading other peoples code, so we tend to encourage people learning things for themselves.

You task breaks down as follows:

  1. Determine how to save / load information. This could be using the Python API with files, or using the BGE save/load globalDict functions (also exposed as actuators, for some bizarre reason).

  2. Determine how to access the current scene, and how to set a specific scene.

  3. Determine how to combine those two operations.

If everyone asked questions whenever they encountered something new, there’d never be enough time to answer them all! This includes all of us, as we’re always learning.

I hope that you understand where we’re coming from.

There is a resource by Monster for save load somewhere. The globalDict method is by far the easiest.When there are already many topics on the subject, it is a little