Roob's Vsync/fps Guide
Roobubba
Who you gonna call? Join Date: 2003-01-06 Member: 11930Members, Reinforced - Shadow, WC 2013 - Shadow
<div class="IPBDescription">a personal perspective</div> I have, since the dawn of my gaming career, played in OpenGL (yeah ok, my online gaming career post quake 1 <!--emo&;)--><img src='http://www.unknownworlds.com/forums/html/emoticons/wink.gif' border='0' style='vertical-align:middle' alt='wink.gif'><!--endemo-->) with vsync disabled.
Why? To understand what you're doing with Vsync it's important to know:
<b>WHAT VSYNC IS</b>
Vsync, or "vertical synchronization" ensures that your monitor refresh rate (in Hz = 1/s) is synchronized with the in game frame rate (also effectively measured in "Hz" ie frames/s (fps)). It is set in your graphics card settings NOT IN GAME.
Disabling vsync means that the game will determine the frames per second, by running as fast as is possible in a particular configuration. The monitor will run at whatever the default refresh rate is at the resolution you're running in game.
VSYNC gives a different feel to how the game engine responds. With VSYNC off you may find more responsiveness, but it may feel less smooth than with the setting enabled. Try playing with and without Vsync (after addressing the refresh rate issue I describe below!!) to see what you prefer.
***edit: If your game cannot achieve the same frames per second as your monitor with Vsync ON, it will drop to 1/2 the value of your refresh rate, hence fps drops to 30, 20, 15 etc in *steps* when vsync is on, but without vsync the change is in 1fps units (or less) NOTE: I have not found this on ATI radeon boards, so there may be something I'm missing here, but it is well documented on NVidia graphics boards... /edit***
***edit (from discussion on pages 5 and 6 (thanks Anavrin and Jower))
Vsync stops "frame tearing". This occurs when the frame to be displayed by the graphics card changes while the monitor is still "drawing the last one". In other words, the monitor starts to draw one frame, then the frame changes half way through (because the graphics card is outputting faster than the monitor can keep up). The result is called a "tear" and to be honest it looks pretty damn awful. /edit***
<b>Monitor refresh rates</b>
60Hz is bad mmmkay. Speaking personally, I have had very bad headaches and eye strain from using a monitor at 60Hz (I didn't realise, this thread is the result of my realisation).
There are numerous reports of eye strain and headaches being caused by low refresh rates. it appears that running at refresh rates of 72-75 or higher reduces the risk of these problems significantly.
Monitor settings of "optimal" should be taken with a pinch of salt. Don't trust Windows to know what is best for your set up, find out for yourself!
Bear in mind that the resolution you run the game at is most likely to be lower than the resolution you run your windows desktop at. your monitor may be able to handle higher refresh rates at the gaming resolution than at your desktop resolution.
You have to know what resolution your monitor is able to run at in a particular resolution. Better still, have the correct monitor drivers which should contain this information.
<b>Frames Per Second. How High and Why?</b>
In NS 1.0x and earlier (more generally in the HL engine), many aspects of the game are determined by your client frame rate.
For example, building speeds and jetpack <i>THRUST</i> are determined by fps. Someone with 100 fps will build and jetpack upwards FAR quicker than someone with 30 fps. The same goes for leap and charge - the number of "touches" recorded (hence the number of 4 or 16 damages dealt by each attack respectively) is determined by fps. It is possible to do somewhere between 350 and 400 damage with one single leap at 100 fps.
Half life has a default maximum frame* rate of 72. This can be increased to a maximum allowable value of 100, using the fps_max setting in the console (type "fps_max 100" without the " in console).
*thanks anavrin, 'typo' there.
HOWEVER if vsync is enabled in your graphics card driver settings, the actual fps will be no more than the refresh rate of your monitor at the gaming resolution.
To find out your fps in game, type "cl_showfps 1" in console (without "). Settings 0 disables. (Thanks Uh-Oh)
The "net_graph X" will show you your fps, however as Uh-Oh points out on page 8, this uses a significant amount of resources. It is MOST useful for determining data transfer rates (in packets and kB/s), packet loss and choke values for your connection to the server. Only use for a short time, do not leave this setting on!
DO NOT USE "timerefresh" in console. It is NOT the true value of your fps!
<b>WindowsXP and Windows2000</b>
There is a known problem in these operating systems, where the monitor refresh rate will be defaulted to 60Hz in non-desktop resolutions, WHATEVER REFRESH RATE you have on the desktop setting.
EVEN IF YOU HAVE VSYNC DISABLED your monitor refresh rate will be 60Hz, which as we know is bad for your eyes mmmkay...
A fix I have found to work with both Nvidia and ATI cards under winXP *AND OPENGL* (not confirmed win2k yet) is called Refresh Lock. The website for this program is: <a href='http://www.pagehosting.co.uk/rl/' target='_blank'>http://www.pagehosting.co.uk/rl/</a> <span style='color:yellow'>***EDIT I recommend this for ATI card users, there are more suitable programs for NVidia graphics card users (such as <a href='http://www.nvrt.org/' target='_blank'>http://www.nvrt.org/</a> (thanks EB)!! /EDIT***</span>
This program runs in the background and will force windows to use the maximum refresh rate reported by your monitor or monitor drivers for a particular resolution.
<b>Pre-2k windows</b>
There is not the same problem in these operating systems. Simple registry entries allow for refresh rates to be set for each known resolution.
In conclusion:
If you have a maximum fps of 60.0, you most likely have Vsync enabled, and you should try to increase your monitor refresh rate, because the benefits of increased Hz also give increased fps with VSYNC ON. Job's a good un.
If you have a max fps of 72, you can get higher by setting fps_max 100 in console You probably don't have vsync enabled, hence you may have a monitor refresh rate of 60 Hz (in winXP/2k), you should try to address this issue to make sure your monitor refresh rate is more than 72 (if your monitor supports these refresh rates!)
If you have a max fps of 100, you most likely don't have vsync on, check the above paragraph to ensure your monitor is running properly.
If your fps is very low, it is advised that you don't use vsync (by meh <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->) but still make sure you're running at a high enough refresh rate in game (use refresh lock if necessary)
If your fps is 30, or 20 or 15 constantly and only ever changes between these values, YOU NEED TO DOWNLOAD one of the suggested programs to fix your monitor refresh rate. You monitor is at 60Hz but your system is not good enough to run at 60fps. Ensure you have the correct monitor drivers and ALSO THE BEST NEW GRAPHICS CARD DRIVERS FOR YOUR BOARD**!!!! You will be able to run at a higher FPS by disabling vsync, but YOUR MONITOR WILL STILL RUN AT 60Hz unless you use a refresh fix program.
** NB not necessarily the newest, the *only* way is to try several (you can get lots of drivers, from the very earliest from <a href='http://www.reactorcritical.com' target='_blank'>Reactor Critical</a> but there are MANY other sites you can also get drivers from!! (thanks Uh-Oh) More info: <a href='http://www.guru3d.com' target='_blank'>Guru3D</a>.
Hope this helps. Any questions you can PM me.
I'm not an authority on this, and I've no doubt people will correct me if I've made a mistake here. I shall update it if there's anything wrong or anything unclear.
Thanks for your time, and good luck getting higher refresh rates and frames per second!
PS 1.1 will see a change to the way damage and energy replenishment is calculated to those with lower end systems will not be at a disadvantage any more. This thread is not to discuss this, as there are plenty of other places that has been talked about.
Roo
(edit, thanks TeoH)
edit again, muahaha
Why? To understand what you're doing with Vsync it's important to know:
<b>WHAT VSYNC IS</b>
Vsync, or "vertical synchronization" ensures that your monitor refresh rate (in Hz = 1/s) is synchronized with the in game frame rate (also effectively measured in "Hz" ie frames/s (fps)). It is set in your graphics card settings NOT IN GAME.
Disabling vsync means that the game will determine the frames per second, by running as fast as is possible in a particular configuration. The monitor will run at whatever the default refresh rate is at the resolution you're running in game.
VSYNC gives a different feel to how the game engine responds. With VSYNC off you may find more responsiveness, but it may feel less smooth than with the setting enabled. Try playing with and without Vsync (after addressing the refresh rate issue I describe below!!) to see what you prefer.
***edit: If your game cannot achieve the same frames per second as your monitor with Vsync ON, it will drop to 1/2 the value of your refresh rate, hence fps drops to 30, 20, 15 etc in *steps* when vsync is on, but without vsync the change is in 1fps units (or less) NOTE: I have not found this on ATI radeon boards, so there may be something I'm missing here, but it is well documented on NVidia graphics boards... /edit***
***edit (from discussion on pages 5 and 6 (thanks Anavrin and Jower))
Vsync stops "frame tearing". This occurs when the frame to be displayed by the graphics card changes while the monitor is still "drawing the last one". In other words, the monitor starts to draw one frame, then the frame changes half way through (because the graphics card is outputting faster than the monitor can keep up). The result is called a "tear" and to be honest it looks pretty damn awful. /edit***
<b>Monitor refresh rates</b>
60Hz is bad mmmkay. Speaking personally, I have had very bad headaches and eye strain from using a monitor at 60Hz (I didn't realise, this thread is the result of my realisation).
There are numerous reports of eye strain and headaches being caused by low refresh rates. it appears that running at refresh rates of 72-75 or higher reduces the risk of these problems significantly.
Monitor settings of "optimal" should be taken with a pinch of salt. Don't trust Windows to know what is best for your set up, find out for yourself!
Bear in mind that the resolution you run the game at is most likely to be lower than the resolution you run your windows desktop at. your monitor may be able to handle higher refresh rates at the gaming resolution than at your desktop resolution.
You have to know what resolution your monitor is able to run at in a particular resolution. Better still, have the correct monitor drivers which should contain this information.
<b>Frames Per Second. How High and Why?</b>
In NS 1.0x and earlier (more generally in the HL engine), many aspects of the game are determined by your client frame rate.
For example, building speeds and jetpack <i>THRUST</i> are determined by fps. Someone with 100 fps will build and jetpack upwards FAR quicker than someone with 30 fps. The same goes for leap and charge - the number of "touches" recorded (hence the number of 4 or 16 damages dealt by each attack respectively) is determined by fps. It is possible to do somewhere between 350 and 400 damage with one single leap at 100 fps.
Half life has a default maximum frame* rate of 72. This can be increased to a maximum allowable value of 100, using the fps_max setting in the console (type "fps_max 100" without the " in console).
*thanks anavrin, 'typo' there.
HOWEVER if vsync is enabled in your graphics card driver settings, the actual fps will be no more than the refresh rate of your monitor at the gaming resolution.
To find out your fps in game, type "cl_showfps 1" in console (without "). Settings 0 disables. (Thanks Uh-Oh)
The "net_graph X" will show you your fps, however as Uh-Oh points out on page 8, this uses a significant amount of resources. It is MOST useful for determining data transfer rates (in packets and kB/s), packet loss and choke values for your connection to the server. Only use for a short time, do not leave this setting on!
DO NOT USE "timerefresh" in console. It is NOT the true value of your fps!
<b>WindowsXP and Windows2000</b>
There is a known problem in these operating systems, where the monitor refresh rate will be defaulted to 60Hz in non-desktop resolutions, WHATEVER REFRESH RATE you have on the desktop setting.
EVEN IF YOU HAVE VSYNC DISABLED your monitor refresh rate will be 60Hz, which as we know is bad for your eyes mmmkay...
A fix I have found to work with both Nvidia and ATI cards under winXP *AND OPENGL* (not confirmed win2k yet) is called Refresh Lock. The website for this program is: <a href='http://www.pagehosting.co.uk/rl/' target='_blank'>http://www.pagehosting.co.uk/rl/</a> <span style='color:yellow'>***EDIT I recommend this for ATI card users, there are more suitable programs for NVidia graphics card users (such as <a href='http://www.nvrt.org/' target='_blank'>http://www.nvrt.org/</a> (thanks EB)!! /EDIT***</span>
This program runs in the background and will force windows to use the maximum refresh rate reported by your monitor or monitor drivers for a particular resolution.
<b>Pre-2k windows</b>
There is not the same problem in these operating systems. Simple registry entries allow for refresh rates to be set for each known resolution.
In conclusion:
If you have a maximum fps of 60.0, you most likely have Vsync enabled, and you should try to increase your monitor refresh rate, because the benefits of increased Hz also give increased fps with VSYNC ON. Job's a good un.
If you have a max fps of 72, you can get higher by setting fps_max 100 in console You probably don't have vsync enabled, hence you may have a monitor refresh rate of 60 Hz (in winXP/2k), you should try to address this issue to make sure your monitor refresh rate is more than 72 (if your monitor supports these refresh rates!)
If you have a max fps of 100, you most likely don't have vsync on, check the above paragraph to ensure your monitor is running properly.
If your fps is very low, it is advised that you don't use vsync (by meh <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->) but still make sure you're running at a high enough refresh rate in game (use refresh lock if necessary)
If your fps is 30, or 20 or 15 constantly and only ever changes between these values, YOU NEED TO DOWNLOAD one of the suggested programs to fix your monitor refresh rate. You monitor is at 60Hz but your system is not good enough to run at 60fps. Ensure you have the correct monitor drivers and ALSO THE BEST NEW GRAPHICS CARD DRIVERS FOR YOUR BOARD**!!!! You will be able to run at a higher FPS by disabling vsync, but YOUR MONITOR WILL STILL RUN AT 60Hz unless you use a refresh fix program.
** NB not necessarily the newest, the *only* way is to try several (you can get lots of drivers, from the very earliest from <a href='http://www.reactorcritical.com' target='_blank'>Reactor Critical</a> but there are MANY other sites you can also get drivers from!! (thanks Uh-Oh) More info: <a href='http://www.guru3d.com' target='_blank'>Guru3D</a>.
Hope this helps. Any questions you can PM me.
I'm not an authority on this, and I've no doubt people will correct me if I've made a mistake here. I shall update it if there's anything wrong or anything unclear.
Thanks for your time, and good luck getting higher refresh rates and frames per second!
PS 1.1 will see a change to the way damage and energy replenishment is calculated to those with lower end systems will not be at a disadvantage any more. This thread is not to discuss this, as there are plenty of other places that has been talked about.
Roo
(edit, thanks TeoH)
edit again, muahaha
Comments
As a side note, while there are well known problems with JP thrust/build times, alot of aspects of NS which are sometimes rumoured to be fps dependant actually aren't. This is often caused by people testing things on a localhost, this is not a reliable test. Certain aspects of the game can become framerate dependant when you are acting as the server, but are not framerate dependant when played online.
Take for example alien energy regeneration, i am more or less positive this is not framerate dependant. And i think the ideal way of me showing this is the res node test. We've all munched res nodes as a skulk, and i think everyone will claim the same results - you run out of energy shortly before the res node dies, and have to wait a couple of seconds to fill up before you can kill it. I run in 100fps and this is what happens when i munch a res node - everyone else who i have seen munch a res node performs identically to me, regardless of their framerate.
There is also the issue of firing rate, testing the firing rate of a LMG on a localhost appears to indicate FPS-dependant behaviour. (Try 100fps versus 20fps, at 20fps the lower frame rate appears to be able to fire an LMG clip faster than at 100fps). But on a server under normal conditions this framerate dependancy does not exist.
I'm not sure about leap touches, i haven't tested them myself although i have seen the post by someone who has apparently tested them. It's probably worth asking - was leap tested on a normal dedicated server, or over localhost?
<!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->
AFAIK leap and charge ARE fps based, as is jetpack regeneration. I'm also not sure about alien energy replenishment or firing speeds though.
needless to say, higher fps and higher Hz = good news all round (if picture quailty is not affected of course <!--emo&;)--><img src='http://www.unknownworlds.com/forums/html/emoticons/wink.gif' border='0' style='vertical-align:middle' alt='wink.gif'><!--endemo-->)
IDHTBIFOM is a good one <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->
Incase of Draft, Hang Three Blue Inflamed Fatties Over Mantlepiece.
Or it could just be "I Dont Have The Book Infront Of Me", but thats rather boring :/
GAH
I've only seen IDHTBIFOM used by RPGers so I thought it might take a bit longer then 6 minutes for someone to reply to it <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->
K, on-topic.
Is there anyway you can damage your monitor using the above advice ? My monitors not the best in the world and i've just left my FPS capped cos I couldn't be bothered looking into it any further.
Nice going r000r0r0r0
If game, say you're running at 800x600 under winXP and openGL. Without installing a refresh fixing program your monitor will be running at 60Hz. it may be the case that you have an old monitor whose maximum refresh rate at 800x600 is 60 Hz.
<span style='color:blue'>By installing the correct monitor driver</span> (and NOT windows DEFAULT MONITOR, as your old monitor will very likely NOT provide the PC with information about available refresh rates (I forget the acronym for this thing but newer monitors should talk to windows to say "Yes, I can handle 100Hz at 1024x768"))<span style='color:blue'> refresh lock will force the best available refresh rate for a given resolution. If the incorrect information about available refresh rates is present (eg an incorrect driver that says you can do 100Hz at 800x600), this higher resolution will be used. Depending on the monitor this could seriously damage it very quickly. Many monitors simply switch off, so you may have a hard time getting back to the correct refresh rate afterwards.</span>
In other words, get the right drivers for your monitor and follow the instructions given by the refresh lock program, and you will be absolutely fine.
You can still achieve very high framerates with any type of monitor, simply by disabling vsync (but note with a CRT you should make sure it is running at a higher refresh rate in game!).
If you're playing on an LCD, from what I have read you may find it better without Vsync on. That's an opinion though, not a fact.
This wasn't aimed at LCD screens and I wouldn't like to say one way or the other I'm afraid. Maybe someone with experience of gaming on these screens would like to input some more?
I use an LCD at work, and it is reported to be set at 60Hz (I tried 70 and 72Hz but the moitor simply switched off at these refresh rates).
From what I understand, the graphics card outputs the signal the same to an LCD as it does to a CRT. The relevance of this, I'm not 100% sure about.
Roo
The subject of refreshrates on LCD panels is a different issue, the reason CRTs have an irritating flicker at low refresh rates is due to the way the screen works. Electrons are fired at the screen, and illuminate it once they hit, before fading away. The higher the refresh rate, the more frequently electrons are fired at the screen, and the less time there is for the screen image to dim. The flickering at low refresh rates is caused by the screen dimming after each update, and then being relit on the next pass. This happens quickly and appears as a flicker.
On an LCD panel, individual pixels are switched on and off or changed in colour, but they do not dim inbetween screen updates. A pixel that is switched on, will stay on, so there is no rapid dimming of the screen and consequently no flickering at low refresh rates. 60hz looks perfectly fine on an LCD.
<!--QuoteBegin--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->
You can still achieve very high framerates with any type of monitor, simply by disabling vsync
<!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
While you can achieve a very high game engine framerate, which is fine for getting additional thrust from a JP, there is an important difference between 100fps @ 100hz, and 100fps @ 60hz. (And not just that one strains your eyes). When running at 60hz, regardless of how quickly your gfx card might be generating frames, your monitor is still only updating its image 60 times a second, you will not get the full visible benefit of 100fps unless you have a high monitor refresh to match. If you don't believe all those people who claim they can see the difference between 60 and 100fps, it's probably because they have an appropriate refreshrate, and you dont.
<!--QuoteEnd--> </td></tr></table><span class='postcolor'> <!--QuoteEEnd-->
Probably the single most important thing said in this whole thread ^^^
Bah I'm jealous I didnt come up with that line <!--emo&;)--><img src='http://www.unknownworlds.com/forums/html/emoticons/wink.gif' border='0' style='vertical-align:middle' alt='wink.gif'><!--endemo-->
Roo
Read the initial post, HL does not have any influence over the refresh rate, but Windows XP and 2000 will both lock your refresh rate to 60hz when running in openGL. It is a problem with Windows that can be bypassed using Refreshlock.
Some engines such as Q3 have console commands that allow you to change the refreshrate from within the console, unfortunately this is not true for HL :\
I run at 100hz so i'll confirm for you that HL is not limited to 60.
<!--QuoteBegin--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->
real men dont need high fps
<!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
Real men are skilled enough to benefit from the advantage of a smooth update. People who have no control over their game and may as well be spazzing over the keyboard randomly dont need high fps.
Actually, I don't have anything useful to contribute in here anymore, although I would have explained the fps-issue with LCDs if TeoH didn't do that <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->
when i try and put my refresh rate to anything higher than 70, then the screen becomes fizzy blured lines, and, i put it to adapter default to avoid optimal, but feel optimal is probably 60 from the feeling of my eyes. <!--emo&:(--><img src='http://www.unknownworlds.com/forums/html/emoticons/sad.gif' border='0' style='vertical-align:middle' alt='sad.gif'><!--endemo-->
i don`t know about my vsync, i cant find anywhere to switch it on or off. i got nvidga gainward geforece 440 with 1700 AMD and my fps caps around 70.
i have done with the unlock fps console command thing in hl.
when i try and put my refresh rate to anything higher than 70, then the screen becomes fizzy blured lines, and, i put it to adapter default to avoid optimal, but feel optimal is probably 60 from the feeling of my eyes. :(
<!--QuoteEnd--></td></tr></table><span class='postcolor'><!--QuoteEEnd-->
The fuzzy blured lines are your monitor trying to run in a mode it doesn't support, clearly your monitor will not run at higher than 70hz in whatever resolution you are using. Set up refreshlock to use 70hz in that resolution to make sure you are getting the best refresh rate you can manage, 70hz isnt particularly high so it is possible the screen will still sppear flickery to you. On some monitors you will be able to check the refresh your monitor is currently running in through the On-Screen Display, that may show you wether you are getting 60 or 70, as it can be difficult to tell.
If you are running in quite a high resolution, you may be able to get a higher refresh rate by lowering your resolution.
Vsync is controlled by your video card drivers, and the option to switch it on/off will normally be in the 'Advanced' section, under the settings tab of display properties. Where exactly the option is will differ depending on your drivers, also it may be called something less than obvious. Look for anything along the lines of "Sync vertical refresh". I know all the GFs have this option somewhere in the drivers, but i'm not currently using one, so i can't check where it would be located in the detonators. Someone else can probably give you instructions for finding the setting.
now ive got an LCD, and although I can get my game to generate above 60 fps with vsync off, it makes no difference... things look much smoother on an LCD with vsync on though... however if you want that advantage when jetpacking and building, leave it off til 1.1 comes out.
P.S. Since i am running XP with refreshlock (good proggie mentioned above) i have my frefresh rate set at 120Hz in game and the max FPS at 100 i get 99 frames all the time so i dont have to worry much about framerate issues... one thing bugs me tho, why does HL have a hardcoded max of 99fps? other games like quake its possible to get as high as 300+ frames on a good setup <!--emo&:(--><img src='http://www.unknownworlds.com/forums/html/emoticons/sad.gif' border='0' style='vertical-align:middle' alt='sad.gif'><!--endemo--> why VALVe WHY?
So I turned it off and set fps_max to 84 (I dunno works better than 85...) and it works fine, no frame differences or anything
but anyway i have not noticed any flickering in NS and upuntill now i did not know XP did that set to 60 Hz thing. i am useing plug anplay moniter drivers. (not by choice) but yeah 60 Hz never botherd my eyes. but yeah maby i'm just strange.