Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Daishim

How to do loading screens.

This topic is 5459 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!