Jump to content
  • Advertisement

Archived

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

vbisme

FPS again

This topic is 6197 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
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.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!