How to do a Load progress bar in GE?

Hi everyboby.

this is my first thread, i’m so happy to be here :o

Well someone know how to make a Load bar in GE with python (or else…)? I like to do this to make loadings tween levels in game.

Thanks for all

I don’t think that you can make real loading bars. But you can make fake ones :slight_smile:
Just get a plane with scale-Ipo’s and a property with Ipo set to property

-Pret_Letter

Ive never done it before, but it is possible.

I think one way to do it is to have 2 .blend files, the first is your game level etc, the second is just a camera with a loading bar, or background picture etc, something that tells you the game is loading.

In the ‘loading’ blend file the only other thing to include (most important) is an always sensor setting off a Game actuator set to ‘Load a new game’, which loads the second .blend file.

Then just save the runtime of that first ‘loading’ blend file and run the game from that. Once the .exe is started it will display the loading screen, and pause untill the actual game has loaded completely.

Its the way the apricot demos have been done (at least im pretty sure)

Hope that made sense, i dont know what level your at with the BGE yet.

Great Idea AD…
But where i can pop the information about load?
Something like… kb_loaded from kb_total ? In python i can return the file size (kb_total ?), but kb_loaded? Where i can find?

Thanks for help (you too Pret)
regards

Hmm, I’ve done this in Flash with ActionScript, I’m not shure if PythonGE supports this type of management,but it should be possible, maybe with some kind of external software that tells the blend file this parameters and the blend file displays them.

Hmmm, im not sure about how to get the percentage loaded. But a lot of pro games dont even bother with that. They just have an animated loading picture or something. Perhaps a cursor which rotates around, or just a simple bar which repetativly runs though an animation to let the player know somethings happening/loading.

Would be good to know if theres such a python command though.

I don’t think that blender can do a progress bar at the moment because it would require a ‘Multi-Threaded’ environment like your web browser uses - this allows flash based web sites to display a pre-loading animation.
One possible solution would be for someone to add an ‘On-Start’ Sensor to the current game logic, which triggers after the scene objects have been loaded.
Using this, you could start an animation in one scene, which plays until it receives a message from the On-Start Sensor, then you could have it switch to the main game environment.
Regards,
Journeyman17

But python (and Blender) are multithreading like a browser, besides we haven’t a GE with multi-actors.
This scheme about messages in GE sounds like bunny_load.blend. I found the file but not the tutorial… if someone know where is it, please post the link.
I’ll test this scheme. I post ever result.

Regards for all

Hello
in the old NAN days, using the Web plugin, you’ve a “loading bar” by default, I guess…
And I think that the file/script is available?!
Bye

I don’t know how Blender parses through scene objects when it’s loading a .blend scene file, but it should be simple to add a function that updates a progress-variable after each node in the scene graph is loaded.
int SceneLoad()
{
For n=0 to max_objects
{
LoadMesh();
UpdateProgress();
For m=0 to max_textures
{
UpdateProgress();
}
}
}
Maybe this should be submitted to the programming team.
Regards,
Journeyman17