Advertisement

FPS again

Started by August 04, 2001 04:53 PM
0 comments, last by vbisme 23 years, 6 months ago
Sorry, once again could someone show me how to calculate frame per second?
well, the easiest way is to get the time lapsed during the frame, multiply by 1000 to get seconds, then divide that from the frame count (1). check out the code on my site for more ''advanced'' way to do it. here''s some pseudo:
while(!done)//game loop
{
start_time=timeGetTime();
do all game stuff;
end_time=timeGetTime();
fps=(1/(1000*(start_time-end_time))
}
for a more accurate reading you should span it over about 20 frames or so. once again, check out my class on my site for that.



How many Microsoft employees does it take to screw in a light bulb?
None, they just declare drakness as a new standard.
My HomepageSome shoot to kill, others shoot to mame. I say clear the chamber and let the lord decide. - Reno 911

This topic is closed to new replies.

Advertisement