Jump to content
  • Advertisement

Archived

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

Coaster Kev

How do you determine frame rate?

This topic is 6624 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

I''m new to programming, and everyone talks about frame rate. I''m curious, how do you determine framerate? I''ve been working with C++. Also, what are good frame rates and what are bad one''s? Thanks in advance.

Share this post


Link to post
Share on other sites
Advertisement
Well, the easiest way to do it is to set up a timer which calls a certain function (say, FpsCount()) every second. Each frame you draw, you increase some varaible (FramesDrawn, for example) by one. When the timer calls FpsCount(), it should display FramesDrawn, and then reset it to zero. I''m sure there are other ways, but this way does work.

Martee
Magnum Games

Share this post


Link to post
Share on other sites
quote:

Also, what are good frame rates and what are bad one's?



The human eye can't see above 24 FPS (I think that's the correct number), so basically, anything about 24 is good You'd want to get a framerate that's as high as possible.

Edited by - Muzzafarath on August 26, 2000 4:59:40 PM

Share this post


Link to post
Share on other sites
framerate would be how many frames per second you manage to display. so if you have a variable that you increment for each frame drawn, and the time for the last time you set that variable to zero, you can average the frame rate at the current time (average_framerate = n_frames/(current_time_in_seconds - time_when_I_last_reset_the_frame_counter) )

now, just update this number from time to time (If you update the framerate for each frame, you'll probably have such a varying number it's be hard to read. it's better to average it for a few (20-40 ?) frames) before recalculating the average framerate.

You know, I never wanted to be a programmer...

Alexandre Moura

Edited by - alexmoura on August 26, 2000 5:54:07 PM

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!