How to do loading screens.
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?
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
One possibility is to use a second thread to load the data, while primary thread draws the loading screen stuff.
-Nik
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
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
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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement