Archived

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

yablo_0

How do I make a Loading Screen

Recommended Posts

yablo_0    122
I''m making an OpenGL game, and when it starts, it takes several seconds to load the data. How can i display a bitmap ( a loading screen) while my initalization functions are getting exectuted? Is there a tutorial on loading screens and progress bars using openGL somewhere? Thanks

Share this post


Link to post
Share on other sites
Smacker_626    126
I''m just a noobie but for a Loading Screen I would just use a Texture Mapped Quad if it wasn''t anything special, I don''t know about the Progress Bar

http://nehe.gamedev.net/

Hope that help''s

Share this post


Link to post
Share on other sites
falkone    444
I''d use a loading screen.. i''d divide the load up into segments, and each segment i would update the screen and the progress bar a given amount

Share this post


Link to post
Share on other sites
cowsarenotevil    3006
The textured quad is always good, and you can even fade it out with blending. Just stretch out a red quad for every thind you load, and write progress bar on top, and it will look enough like a progress bar.

-~-The Cow of Darkness-~-

Share this post


Link to post
Share on other sites
PmanC    134
i''ve never actually done this but you could do somthing like this:


init(){
int orox,oroy,progress,totalprocesses;
glBegin(GL_LINES);
progress=0;
...load somthing...
glColor3f(0,0,1);
glVertex2f(orox,oroy);
glVertex2f(totalprocesses*10,oroy);
glColor3f(1,0,0);
glVertex2f(orox,oroy);
glVertex2f(progress*10,oroy);
progress=1;
...load somthing else...
glColor3f(0,0,1);
glVertex2f(orox,oroy);
glVertex2f(totalprocesses*10,oroy);
glColor3f(1,0,0);
glVertex2f(orox,oroy);
glVertex2f(progress*10,oroy);
...however many more times you need to
glEnd();
}

that would draw a single line progress bar. you might want to clear the screen before every drawing of the bar. -PmanC

Share this post


Link to post
Share on other sites
llvllatrix    340
To make something interesting you can use any effect that can indicate progress - you could alpha in a 3d model that quickly loads or something. The basic idea is that you update the scene whenever you load something from disk. You may be wondering how you update the screen if you are loading from disk - remember that if you dont swap buffers, OGL wont change the scene. All you have to do is draw the next scene, load the data, and swap the buffers.

Share this post


Link to post
Share on other sites
duhroach    225
I can''t remember where I saw it, but one of the coolest loading screens I had ever seen.
It pre-loaded a mini game , and set the timer to the amount of time it would take to load the next map. during that mini game, you could recieve bonuses etc.

Pretty interesting Idea if you ask me. I always hated the fact that "Loading.." ment "Get a sandwhich"

~Main

==
Colt "MainRoach" McAnlis
Programmer
www.badheat.com/sinewave

Share this post


Link to post
Share on other sites
PmanC    134
quote:
Original post by duhroach
I can''t remember where I saw it, but one of the coolest loading screens I had ever seen.
It pre-loaded a mini game , and set the timer to the amount of time it would take to load the next map. during that mini game, you could recieve bonuses etc.

Pretty interesting Idea if you ask me. I always hated the fact that "Loading.." ment "Get a sandwhich"

~Main

==
Colt "MainRoach" McAnlis
Programmer
www.badheat.com/sinewave


!!!ORIGINAL TEKKIN!!!

don''t know if that''s how you spell it... -PmanC

Share this post


Link to post
Share on other sites
K-1    122
This isn''t just for "Loading..." screens either. Anywhere you need a progress bar, i.e. an RPG game like Final Fantasy 7, you can use this sort of quad-stretching. If you are using OpenGL w/ MFC you could even use the progress bar common control. The implementations and uses are almost limitless.

Share this post


Link to post
Share on other sites
yablo_0    122
actually, the actual drawing of the loading screen is not a problem, the problem is updating or drawing to the screen while executing some function which takes a conciderable amount of time executing before its done so basically

myInitFunction()
{
.... druing this time display a loading screen
}

function finished executing... loading screen not displayed

do you have to thread processes for that sort of thing?
or not Swapping the buffers would do as someone mentioned above?

thanks

Share this post


Link to post
Share on other sites