View Full Version : tech talk

20th Oct 2004, 21:00
Hi all.
Ive got a general question which is not only for thief.
In many games you can choose to use "vsync" and "triple buffer".
What are these things and should we use them?
Any combination between these two?
thank you

20th Oct 2004, 23:29
VSync is an option to drop frames so that the framerate matches the rate at which your monitor redraws the screen. This can reduce tearing, where the upper and lower sections of the screen are different frames (ie. the frame changed while it was being drawn.) I don't know how to explain triple buffering, except that it is supposed to improve framerate if you have a large amount of video Ram.

Alan W
31st Oct 2004, 16:40
This topic has been around for a week so or so, but in case anyone still wants to know about triple buffering...

Firstly, with no buffering, the game writes directly to the screen with the result that you can see half drawn screens and get lots of flickering. (In the early days of simple games, it was possible to use vsync (see earlier explanation) and a delay such that all such direct screen writes occurred in the flyback period when the electron beam in your monitor was going from the end of the screen scan back to the top left - but in these days of more complex games, this doesn't give sufficient time to update the screen).

Double buffering was invented so that games could use the full time of one display scan when writing to the screen. There are two pages of video memory. One is displayed, while the other is being written to by the game. Each time a vysnc occurs, the two are swapped, such that the newly written page is displayed & the game starts to write the next frame to the page that was previously being displayed. However there is still a drawback in that the game must write pages at the same rate as the monitor refresh rate. If the game runs a bit slow and doesn't complete the update in time, the page swap does not occur until the next vsync. If the game is only slightly "over-framing", then there is probably quite a long time until that next vsync and during that time, there is no spare video page to draw to, so the game stops and wastes that time. The framerate immediately drops to half rate!

With Triple buffering, if the game takes longer to write a page then the monitor frame rate, then the pages will not be swapped on vsync (as for double buffering), but the difference is that because there are three pages of video memory, there is a spare page which the game can immediately use to start constructing the next frame. Thus with triple buffering, the game does not drop to half-frame rate as soon as "over-framing" starts to occur, but only drops the occassional frame.

The above is a bit complicated. You may have to read it twice :D


Mr. Perfect
31st Oct 2004, 22:18
With all that being said, most people don't us V-snyc. Acording to some other folks around here it also limits your frame rates to multiples of the refresh rate. So if Windows XP is using the default refresh of 60Hz, and your video card is cabable of drawing 38 frames a second in Thief 3, V-sync will only display 30 of them. Which is bad... I've never noticed screen tearing myself, so I've always just disabled V-sync in order to get a higher FPS rate and a smoother playing game.