Ok, iv’e read NeHe’s tutorial on creating a timer and all of that but I’m not sure if that code fits my case. I want the screen to render fast but I want only certain things in my scene to be slowed down (because now they are way too fast). This is much like how it is in modern games; a screen could render 20fps or 100fps but all the moving objects move at the same speed in both cases. How can I do this??
dont forget set your movement to units per second… then work from a scalar value which represtents how long in seconds the last frame took to render.
float starttime, endtime, timetaken, scalar;
float movespeed = 10; // move at 10 units per sec
starttime = currenttime;
render();
endtime = currenttime;
timetaken = endtime-starttime;
// assuming your timer reports in 1000's of a second
scalar = timetaken/1000.0f;
position+=movespeed*scalar;