pre-loading a scene

Hi, after a while not using blender, i came up again with a doubt.
I try to make a ‘loading’ screen to pre-load the scene of a certain level, and as i readed by the forum, the way to do that is to load that scene as a background scene, and then removing said scene, as the blender games dont free the memory data till you close the game.
However, i find that doing so makes the game freeze not once, but twice. At loading the scene for background, and at loading it again as normal one. Also, when in that scene are objects that add overlay scenes, some errors appear.
It seems that there’s a problem to remove scenes set at background or overlay with the remove scene actuator.

I think what i want to achieve is something common, so maybe there’s already a standard way to do it. Question is, does anyone know about that?

You can make use of the new dynamic loading features found in Blender 2.5. However, you’ll need to use Python to make use of them.

That sounds interesting, however i find that the api information about libload and libfree is a bit… vague.
Also from some videos i saw just now, it seems that using libload for scenes actually changes to that scene.
Can it be used to simply load a scene into memory without jumping in it, so when you change to it by traditional means it doesnt freeze to load it?

I do not think you can load scenes without freezing.

That scenes are not removed from memory sounds more like a bug rather than a feature.
Scene management is kind of poor in the BGE. You can’t switch a scene from background to forground, you can’t add a scene between other scenes etc.

With the dynamic loading you can load small parts (objects) step by step that you get something like a loading streaming. It will still freeze, but not that long. The downside is tha huge effort you wil need to manage that.

So you’re saying is not possible to preload a scene before going to it?

I do not think it is supposed to do that. But I might be wrong with it. I never read it should be that way.

my trick that I use in my game “Dead Cyborg”:

-put a camera top of the whole scene, so this camera can see all of the objects
-put a black plane (shadeless material, black color) front of this camera, so the camera will see only blackness, but logically see all objects (so Blender will loads every textures and compiles the shaders etc)
-make this camera the active camera
-activate the player camera with camera actuator

Simple but working. :slight_smile:

Ok, covering the scene while loading might be a suitable last ressource. I do it with overlays, thought. Its sad that there’s not a way to preload scenes yet, but anyway thanks everybody for the time an answers~