How to do loading screens.

Started by
3 comments, last by Daishim 20 years, 6 months ago
I was wondering how most games actually do a loading screen. Do they keep going through the game loop and load X amount of things per iteration and update the screen load bar? I''m really curious on the methods used for this. Could someone enlighten me on the subject?

I know only that which I know, but I do not know what I know.
Advertisement
You guessed it right
One possibility is to use a second thread to load the data, while primary thread draws the loading screen stuff.

-Nik

Niko Suni

Thanks.

I know only that which I know, but I do not know what I know.
You could keep going through the game loop and load X amount of things per iteration or

have 1 load function and update the screen everytime it reaches a certain part of the function.

Eg

Loadgame()
{
LoadModels();
UpdateScreen("Models Loaded");
LoadCharacters();
UpdateScreen("Characters Loaded");
etc..

}

If you are using Double Buffering, you will have to swap the buffers in the UpdateScreen function.

Mystique Legacy : Rise of the Forgotten World
I opt for multiple threads - it''s possible to write a ''deferred loader'' which you queue resources upon and it loads them in on a seperate thread. That can cause problems, though - I wondered why my OpenGL textures weren''t being loaded properly, and eventually figured out that the gl is thread-specific.

Superpig
- saving pigs from untimely fates, and when he''s not doing that, runs The Binary Refinery.
Enginuity1 | Enginuity2 | Enginuity3 | Enginuity4
ry. .ibu cy. .abu ry. dy. "sy. .ubu py. .ebu ry. py. .ibu gy." fy. .ibu ny. .ebu

Richard "Superpig" Fine - saving pigs from untimely fates - Microsoft DirectX MVP 2006/2007/2008/2009
"Shaders are not meant to do everything. Of course you can try to use it for everything, but it's like playing football using cabbage." - MickeyMouse

This topic is closed to new replies.

Advertisement