Advertisement

Another question from a novice

Started by August 03, 2002 02:40 PM
1 comment, last by Dark-Rain 22 years, 6 months ago
I haveso far got to grips with the tutorial upto number 13 and have modified the code to do other things. Which is good for me as I am only just learning OGL and C++ at the same time. To most this is a simple question but for me its not, What I would like to know is how can I get the program to show some thing on screen for a set period of time and then go onto another bit. I would love to beable to fade one thing out and then fade another in. I have no idea on where to look for this info and where to start. Any ideas would be appreciated, and perhaps i may post my finished first attempted being very simple to start with.
Yes this is a very easy thing to do, it sounds like you wana do this the simplist way.

just make a counter and increase it with each time the program loops.

Example:

//(make a global (at the top of your cpp))

float counter=0;


//this next part goes in your rendering cycle (where u do the drawing)

counter+=.01;

if (counter < 5)
{
XXXX; //(what ever you wana do)
{

if (counter >5 & counter<10)
{
YYYY;//(what ever u wana do next)
}






That is the simplist way to make a counter and mess around, Later on you will wana use a time based counter, there is a good tutoral on that at www.gametutorials.com

hope this helps



Advertisement
Perhaps you could use lighting effects. Dimm the lighting until it''s off, then swap the scene, then increase the lighting to the desired point.

This topic is closed to new replies.

Advertisement