Loading Screens

Started by
6 comments, last by dirtypope 21 years, 9 months ago
is there any resources on making a really spiffy loading screen? like with a progress bar, or % meter?
Theres no such thing as stupid people... only people with under clocked brains. -dirty
Advertisement
It's pretty easy to do :

- setup and ortho screen and render two quad's
- quad one is textured with the background image (this quad is as big as the screen)
- quad two is textured with the image of the progress bar
- quad two's width is 0 at the beginning and while stuff get's loaded you let it get bigger.
- adding the percentage meter is just rendering text to the screen.

[edited by - George2 on June 30, 2002 3:58:56 PM]
"THE INFORMATION CONTAINED IN THIS REPORT IS CLASSIFIED; DO NOT GO TO FOX NEWS TO READ OR OBTAIN A COPY." , the pentagon
yes true, but i didnt quite word that right... i meant too add not just loading screens but like loading in general... like what would be the best way to go about this...

right now i use a system based off integers that let the program know what it should be rendering... im hoping theres some resources on advanced scene loading...

heres an example of how im doing multiple scene loading now...

create an int on application start up with value of 1,
then where i render scenes i have tidbits like this...

if(Status==1) //App just started, bring up main menu.
{
mainmenu();
//then in main menu when an item is selected it changes Status
}

if (Status==2) //they selected option one...
{
RenderOption1();
//now since status = 2 we no longer render main menu and now render Option 1.
}

and so on... please tell me theres a much better way of doing this...

how would tell if somthing is currently being loaded...
like say i have a function that textures a basic quad with a bitmap named LoadBMP()... now lets pretend it actually takes longer than a nano second to do this would i just see if its currently being loaded by doing...

if (LoadBMP)
{
//loading screen code here
}

or is there a dif way to tell if somthing currently being loaded... and if so where can i find good resources on this... not necesarily a full working source code example... but like an explenation and maybe key bits of code so i can learn it well...

its kinda funny, i been working with OpenGL a while, but never really tried stuff like this... well we all gotta learn it some time =)

any help is greatly appreciated... feel free to make fun of my current way of loading scenes =)
Theres no such thing as stupid people... only people with under clocked brains. -dirty
Well, in smaller applications, everything is loaded before the rendering is done. In bigger apps, it may not be wise to load everything, especially if you won''t need them right away (it may take too long, and there may not be enough memory).

As for telling if something is being loaded, look through you code. Whenever you load something, put a loading screen in there. Start the screen before you load it, and then get rid of it after you load it. For example:
RenderLoadScreen(0%);LoadBMP("font.bmp");RenderLoadScreen(25%);LoadBMP("title.bmp");RenderLoadScreen(50%);LoadBMP("bkgd.bmp");RenderLoadScreen(75%);SetUpProjection();RenderLoadScreen(100%); 


That, of course, is sem-psuedocode.
oh ok, that makes complete sense, thank you.

as for how im using integers to tell what scene to load... is there a better way? or am i doing it how its supposed to be done...
Theres no such thing as stupid people... only people with under clocked brains. -dirty
It is really up to you, and what is easiest for you to program. Integers are a fine way to do, and you could even use boolean values (if there are only a few options). How many scenes are you planning on having? If you are going to have more than 3 or 4, get rid of the IF statements and use a switch statement. It will be more compact and probably a little easier to read.
You could use an enum instead of integers. Also check out the book Design Patterns, as it''ll help with this sort of thing.

Helpful links:
How To Ask Questions The Smart Way | Google can help with your question | Search MSDN for help with standard C or Windows functions
Thank you guys for all the help...

Also, this doesnt relate to Loading screens but i dont want to clutter the forum with too many posts...

In your opinion, what is the best Winsock book out there, the only ones i could find in local book stored were for java, and theres not many good tutorials on the internet about winsock in general, they are all geared towards a specific type of application... so im going to order a book once i get some feedback because i have spent my fair share in money on books that ended up being crap =)
Theres no such thing as stupid people... only people with under clocked brains. -dirty

This topic is closed to new replies.

Advertisement