Another question from a novice
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
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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement