Sign in to follow this  
JamesCobras

Independant frame rate capped

Recommended Posts

Hi guys. Originally i had a simple cap on my frame rate by forcing the main loop to wait until a certain time had passed. Now i have removed that and allowed the program to loop as fast as it can and calculating the time passed. For some reason the frame rate cap seems to be at 60 fps. I know that the DX mesh viewer can do a higher frame rate, but why won't my game run at a higher frame rate, is it my hardware? My hardware is quite old. Any ideas? Thanks JamesCobras

Share this post


Link to post
Share on other sites
Hello ... first of all I'm going to assume that you are using DirectX 9. Generally , the FPS you get matches the refresh rate of your monitor.The FPS you get is 60 because the refresh rate of your monitor is 60.

There is a way around this and that is disabling v-sync. In DirectX 9.0 v-sync can be disabled by doing this when you fill your D3DPRESENT_PARAMETERS structure:

D3DPRESENT_PARAMETERS d3dPP;

d3dPP.PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE;

Hope this helps.

Share this post


Link to post
Share on other sites
But be aware that disabling vsync can lead to tearing artifacts when the screen memory is updated when it is part-way through updating the display. It is for this reason that we lock to vsync in the first place - the monitor is always between frames when the next frame is dumped into the video memory.

Share this post


Link to post
Share on other sites
What would be the purpose of having vsync turned off, anyway? Wouldn't the frames "beyond 60FPS" be impossible to see?

Share this post


Link to post
Share on other sites
Quote:
Original post by Derakon
What would be the purpose of having vsync turned off, anyway? Wouldn't the frames "beyond 60FPS" be impossible to see?


It's primarily useful for debugging graphics and other parts of the engine. The short version is that if you know you run at 500fps you know you can add more physics, animations, graphics etc and still be at a decent framerate (on the pc you're testing on).

Also, some people might argue games get more responsive on higher framerates, even though you can't see it, because the input and physics is handled more precise. Although I don't share that opinion as I don't notice the difference.

Share this post


Link to post
Share on other sites
Quote:
Original post by Tree Penguin
Also, some people might argue games get more responsive on higher framerates, even though you can't see it, because the input and physics is handled more precise.
If you have correctly de-coupled your updates from your rendering, there shouldn't be a difference. In particular, most physics engines require a fixed time step, to maintain stability, so higher (and thus variable) frame rates have no effect.

Share this post


Link to post
Share on other sites
I remember in Quake III, you could jump a little higher/further at higher framerates (100 fps)
And a lot pro Counter Strikers said the crosshair shrank a bit faster too. (They weren't multithreaded as I can remember)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this