V-sync (aka vertical synchronization) was introduced to synchronize frame rendering frequency to the screen refresh rate, which also prevents the “screen tearing” effect when a specific application (game) renders faster than the screen’s native refresh rate allows, resulting in multiple frames being drawn during a single screen refresh.
Since most monitors today use the 60Hz refresh rate (eg. the image is redrawn 60 times per second), it is generally exactly 60 FPS that your game gets limited to when you use V-sync. This of course only applies to systems that are able to render over 60 FPS, there is no point in using V-sync with lower framerates.
However, due to the nature of how V-sync works with the framebuffer, the perceived image drawn by your screen is effectively in the past, which makes your controls feel laggy and unresponsive. Doing some research, I found a simple solution: FPS limiting.
While many games include the option to use V-sync, they rarely offer FPS limiting at the same time (Valve Source engine max_fps works that way and actually has an embedded -1 FPS feature, except in Left 4 Dead). Unlike V-sync that uses a buffer and can save the unnecessary VGA computing power, FPS limiting simply drops the extra frames. The trick therefore lies in using both of these techniques to achieve the perfect situation:
- FPS is synced to your monitor’s maximum refresh rate.
- Unnecessary computing power is saved (you don’t need what you can’t see and it may prevent overheating and potentially increase your VGA lifespan).
- No lag on the user input (mouse, keyboard).
- No screen tearing effect and smooth rendering.
So how to do that?
Simply by using V-sync AND limiting FPS exactly 1 frame below the screen refresh (eg. 59 FPS for a 60Hz screen). This means that there won’t be anything for the V-sync to buffer ahead, your controls will retain instant response and no VGA power will be wasted.
Now for the tools you need:
V-sync is usually present in most modern gaming titles. If it isn’t for some reason, you should still be able to force it through your adequate VGA drivers (both ATI/AMD and nVidia drivers have such an option).
FPS limiting is a bit more tricky. For instance, FRAPS has such a functionality that hooks over DirectX/OpenGL, but it only takes advantage of it while recording (there is a loop workaround, but it’s quite dirty). Luckily, there are different tools. Probably the best one I came around would be Dxtory (a more advanced video recording program) – it has a very functional FPS limiter and works basically for every game you can imagine up to DirectX 10. NTHUSIM would be another tool with an FPS limiter, but it didn’t work for me as well as Dxtory did (the FPS cap was higher than set, probably an implementation error).
Framerate limiting has other advantages however – Let’s say you play a demanding game on a mediocre system and your framerate fluctuates between 30-50. This feels pretty uncomfortable and disturbs your experience. Since you’re below your screen refresh rate and V-sync can’t help, by setting an FPS limiter to your minimum 30 FPS, the game will feel way smoother and you can adjust to it quickly (many console titles are @ 30 FPS limited for instance). Mind that V-sync also only works in fullscreen applications, therefore FPS limiting is your only friend in windowed mode.
Hope this helps, let me know!