-
framerate vs refreshrate
I'm using a timer to limit the framerate in my game. I just found out how to do it, and it works fine. There is a problem though.
First of all I need to be able to play the game well in windowed AND fullscreen mode. The refreshrate for the fullscreen mode is 60hz, and the refreshrate in windowed mode is 85hz. I want to limit the framerate to 60hz. In fullscreen mode this works well (nothing really changes), but in windowed mode, the movement in my game isn't smooth.
I figured this is because the refreshrate is 85hz, and the framerate 60hz. So 25 frames are shown on the screen double as long as the other 35 frames.
When I change the framerate to 42.5 (85 / 2) it runs smoothly in windowed mode, but I get trouble in fullscreen mode.
Does anyone know how to solve this ? (Except for changing the framerate to 5 :)
Thanks in advance.
-
Use the refresh rate of the monitor and you have no troubles. Just vsync it. If the refresh rate of the monitor or screen is greater than your game...why would you want to slow the game down when you can get more frames? I'm lost.
-
You shouldnt need to limit your framerate. Everything should be time based so that when run on slower or faster computers the speed of the game will be the same but the framerate will vary, unless ofcourse vsync is turned on.