Difference between revisions of "Smooth Quake"

From QWiki
*>Kalma
*>Kalma
(Major revamp)
Line 1: Line 1:
 
This page contains solutions and tips for various tearing, lagging, jerky and sucky Quake configurations.
 
This page contains solutions and tips for various tearing, lagging, jerky and sucky Quake configurations.
  
=Common tips=
+
==Hardware and drivers==
* '''More FPS''' = smoother quake. So is important to use independent physics. This is preset on ezQuake client.
+
===Display===
* Use '''maximum vertical refresh frequency''' of the screen. '''This is the ultimate tip.''' See below for how-to.
+
A good display for Quake has high refresh rate (Hz). There is no clear answer as to how high is enough. 154Hz (two times physics rate) is a nice number, but practical difference to 120Hz is not great.
* Overclock the usb port to have''' at least 500hz''' (updates) per second. This is ultimate tip #2.
 
* Turn off '''vertical synchronization''' on your graphics card settings and also in ezQuake by setting vid_vsync 0.0.  If you want to keep things smooth but not suffer the quality loss of turning vsync off, enable double/tripple buffering.  In software rendering version you have to use -dibonly command line options and vid_nopageflip 1 setting.
 
* Dont forget to '''install soundcard/motherboard/chipset drivers''' from the hardware manufacturer's site. They also tend to have a FAQ or something similar there. To identify the hardware on Linux, run <code>lspci</code>. Windows has a built-in one in the control panel, but it's not the greatest so there might be some good 3rd party tools.
 
* Make sure that '''no other program is running''' when you run quake. They steal your CPU and therefore make FPS hits. This is especially true if your pc is old. Be sure that your system is not running any malware. Make sure other background applications do not cause CPU spikes (see below)
 
* Turn off '''threaded optimizations''' if you have multicore CPU and NVIDIA GFX card; You will this setting in your GFX card settings
 
  
= Important tips =
+
If you have an LCD display with a high [http://en.wikipedia.org/wiki/Input_lag input lag], you should consider other options. Maybe you have an old CRT monitor you could resurrect for Quake use or simply buy an 120Hz LCD. See [[TFT]] for some tips if you're using a TFT/LCD monitor.
== Setting independent physics ==
 
No matter what your monitor type is, make sure you got this enabled. To set it on Ezquake:<BR>
 
''cl_independentphysics 1''<BR>
 
''cl_nolerp 0''<BR>
 
''pushlatency 0 (older clients)''<BR>
 
''cl_physfps 77''<BR>
 
 
 
==FPS Limit Fine-Tuning==
 
Don't set cl_maxfps to 0. Define a limit, based on the power of your pc. The more the better, but you want a stable value, so you got to figure that number out. The number you choose must be related on your monitor's refresh rate. cl_maxfps can be equal, double, triple, 10 times the value of refreshrate. This usually delivers good results. Just don't set it too high, you want stable fps.
 
 
 
Especially with LCD devices be aware if your FPS limit (cl_maxfps) is a multiplication of your display refresh frequency. For example using 75 Hz display refresh frequency and FPS limit 225 (= 3*75) will be significantly different from using 235 FPS.
 
 
 
Setting cl_maxfps to a value that is below your systems limit also lends cpu time to other processes. This alleviates problems with mouse responsiveness (mouse driver) and CPU spiking (other programs).
 
 
 
==Vsync fine-tuning==
 
While vertical synchronization introduces image lag and forces one to use lower FPS rates than possible with unlimited FPS, on some configurations when fine-tuned it gives much smoother gameplay than when turned off.
 
 
 
To toggle vsync on, type vid_vsync 1 and cl_maxfps 0 in the console. Now you need to determine what is your video lag and FPS. Type /show vidlag and /show fps; You should use new hud (scr_newhud 1) to have these counters visible. The goal is to have stable FPS equal to your display frequency (60 / 75 / 120 / 150 ...) while having the video lag as low as possible.
 
Make sure you have client version that has the cl_vsync_lag_fix and cl_vsync_lag_tweak variables.
 
 
 
Start with setting cl_vsync_lag_fix 1. Your video lag might decrease now, but also FPS may decrease. This is where cl_vsync_lag_tweak comes into play. You have to find the lowest value of the _tweak variable that gives you stable FPS equal to the display frequency. Such a value will decrease the video lag as much as possible without breaking FPS stability. For example tweak set to 0 will decrease video lag to almost 0 ms, but most probably will shut down your FPS rate. And tweak 20 typically won't reduce video lag at all, even if your FPS is super-stable. So find some good value in between.
 
 
 
== Setting custom refresh rates on CRT monitors==
 
Lower the resolution, higher the available refresh rate. So you will have to find a compromise. If your monitor is capable of 154Hz (2*77) in a low resolution, it's at least worth a try. Most people feel the high refresh rates are worth the loss in resolution.
 
 
 
If you have a recent graphics card, the drivers probably has inbuilt custom refresh rate feature. If not, you can use an external program like [http://entechtaiwan.net/util/ps.shtm Powerstrip] or Refresh Lock.
 
 
 
== Mouse refresh rate ==
 
 
 
This measures how many times the input of your mouse is updated. Preset value is 125hz. But if you "overclock" this value to 250hz, 500hz or even 1000hz, you will notice a GREAT improvement on the smoothness. 1000hz is too resource consuming, and its not that different than 500hz. You can try 1000hz only if you have more than 500fps. There are several programs that do this, you can try [http://www.softpedia.com/get/Tweak/System-Tweak/USB-Mouserate-switcher.shtml this]. You can check your current mouse rate using [http://tscherwitschke.de/mouseratechecker.html this tool].
 
  
== Some examples ==
+
On CRT displays you can lower resolution to achive higher refresh rates. Your video card drivers probably have a custom refresh rate feature. If not, you can use an external program like [http://entechtaiwan.net/util/ps.shtm Powerstrip] or Refresh Lock.
These are usually good combinations of refresh rate, cl_maxfps and mouse rate.
 
<BR>
 
Sync everything and you get smooth experience (125Hz monitor, 125fps, 125Hz mouse).  
 
Sync parts of it with very high refreshrates and you'll get smoother experience (150Hz monitor, 500fps, 500Hz mouse).  
 
To make it overkill, use very high refreshrates with slight desync (150Hz monitor, 13*77=1001fps, 1000Hz mouse).
 
<BR>
 
1) 120Hz monitor, cl_physfps 77 + cl_maxfps 120, 500Hz mouse<BR>
 
2) 154Hz monitor, cl_physfps 77 + cl_maxfps 154, 500Hz mouse<BR>
 
<BR>
 
even better 1): 120Hz monitor, cl_physfps 77 + cl_maxfps 240, 500Hz mouse<BR>
 
even better 2): 154Hz monitor, cl_physfps 77 + cl_maxfps 1001, 1000Hz mouse<BR>
 
  
In any of these cases you can use you can try setting the cl_maxfps to 77, 154, 231, 308, 385, 462, 539, 616, 693, 770, 847, 924, 1001, 1078, 1155, 1232 and so on<BR>
+
===Mouse===
Thanks to [[Renzo]] by providing the info.
+
USB polling rate should be raised to 500Hz or 1000Hz from the default 125Hz. Some mouse drivers have this option, otherwise use [http://www.ngohq.com/news/15043-how-to-increase-usb-sample-rate-in-windows-vista-7-a.html HIDUSBF]. [http://www.youtube.com/watch?v=VxhAKJ-Dyes Video guide]
  
= CPU spikes =
+
===CPU spikes===
 
If you feel like the game runs smooth for a while but you recognize small disturbing semi-periodic interrupts, those can be caused by background applications. Start by opening Task Manager (ctrl+alt+del) and checking whethe some other processes are consuming the CPU time.
 
If you feel like the game runs smooth for a while but you recognize small disturbing semi-periodic interrupts, those can be caused by background applications. Start by opening Task Manager (ctrl+alt+del) and checking whethe some other processes are consuming the CPU time.
  
Line 65: Line 19:
 
* [http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx Process Explorer] - Contains CPU Usage graph where you can track for CPU spikes and display what process is causing them. If it's the "System" process, check for wrongly uninstalled/conflicting firewalls or buggy drivers.
 
* [http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx Process Explorer] - Contains CPU Usage graph where you can track for CPU spikes and display what process is causing them. If it's the "System" process, check for wrongly uninstalled/conflicting firewalls or buggy drivers.
 
* [http://technet.microsoft.com/en-us/sysinternals/bb896642.aspx FileMon] - Simple tool to show you which Windows applications are accessing your hard-drive
 
* [http://technet.microsoft.com/en-us/sysinternals/bb896642.aspx FileMon] - Simple tool to show you which Windows applications are accessing your hard-drive
 +
* In Windows 7, you can use Resource Monitor: enter "resmon" in start menu search box.
 +
 +
===Other issues===
 +
* ''Threaded optimization'' can cause unstable frame rate if you have multicore CPU and NVIDIA video card; You can turn it off in video card driver settings.
 +
 +
==ezQuake settings==
 +
===Independent physics===
 +
Independent physics separates frame rate from physics rate allowing frame rates above 77.<BR>
 +
''cl_independentphysics 1''<BR>
 +
''cl_physfps 77'' equals the setting on almost all servers.<BR>
 +
''cl_nolerp 0'' (default) disables linear interpolation of objects in the game.<BR>
 +
''cl_nopred 0'' (default) prediction for your character is enabled.
 +
 +
===FPS limit fine-tuning===
 +
Don't set ''cl_maxfps'' to 0. Define a limit, based on the power of your pc. The more the better, but you want a stable value, so you got to figure that number out. The number you choose must be related on your monitor's refresh rate. ''cl_maxfps'' can be equal, double, triple, 10 times the value of refreshrate. This usually delivers good results. Just don't set it too high, you want stable fps.
  
In Windows 7, you can use Resource Monitor: enter "resmon" in start menu search box.
+
Especially with LCD devices be aware if your FPS limit (cl_maxfps) is a multiplication of your display refresh frequency. For example using 75 Hz display refresh frequency and FPS limit 225 (= 3*75) will be significantly different from using 235 FPS.
  
= Useful Ezquake commands =
+
Setting ''cl_maxfps'' to a value that is below your systems limit also lends cpu time to other processes. This alleviates problems with mouse responsiveness (mouse driver) and CPU spiking (other programs).
*if you get pixels in ezquake, try gl_ztrick 0 or 1
 
*if you need more fps (you can use [http://shub-hub.com/files/demos_quakeworld/fps.zip fps.qwd] demo for benchmark), try r_dynamic 0 or use lower screen resolution.
 
  
= Tools =
+
===Vsync fine-tuning===
If you dont have quake installed already use [[NQuake]] as the installation media.
+
While vertical synchronization introduces image lag and forces one to use lower FPS rates than possible with unlimited FPS, on some configurations when fine-tuned it gives much smoother gameplay than when turned off.
* http://nquake.com
 
You can find lots of tips for the ezQuake client in the [http://ezquake.sourceforge.net/docs/?independent-physics Independent Physics Guide].
 
  
 +
To toggle vsync on, type ''vid_vsync 1'' and ''cl_maxfps 0'' in the console. Now you need to determine what is your video lag and FPS. Type ''show vidlag'' and ''show fps''; You should use new hud (scr_newhud 1) to have these counters visible. The goal is to have stable FPS equal to your display frequency (60 / 75 / 120 / 150 ...) while having the video lag as low as possible.
  
 +
Start with setting ''cl_vsync_lag_fix 1''. Your video lag might decrease now, but also FPS may decrease. This is where ''cl_vsync_lag_tweak'' comes into play. You have to find the lowest value of the _tweak variable that gives you stable FPS equal to the display frequency. Such a value will decrease the video lag as much as possible without breaking FPS stability. For example tweak set to 0 will decrease video lag to almost 0 ms, but most probably will shut down your FPS rate. And tweak 20 typically won't reduce video lag at all, even if your FPS is super-stable. So find some good value in between.
  
If you have an ATI or NVIDIA card you should always install their official (proprietary, only in binary form) drivers to get the highest fps. There's also a popular 3rd party driver with some optimizations for ATI/NVIDIA. It comes with various tools for adding modelines and overclocking; (note that r200 is fully supported in linux with the opensource x.org driver)
+
===Tweaking the rates===
* http://www.nvidia.com/content/drivers/drivers.asp
+
These are usually good combinations of refresh rate, cl_maxfps and mouse rate.
* http://ati.amd.com/support/driver.html
 
* http://www.omegadrivers.net/
 
  
Other tools:
+
Sync everything and you get smooth experience (125Hz monitor, 125fps, 125Hz mouse).
 +
Sync parts of it with very high refreshrates and you'll get smoother experience (150Hz monitor, 500fps, 500Hz mouse).
 +
To make it overkill, use very high refreshrates with slight desync (150Hz monitor, 13*77=1001fps, 1000Hz mouse).
  
* [http://entechtaiwan.net/util/ps.shtm Powerstrip] or PCWizard or newest Nvidia drivers - With these programs u can fine-tune your display frequency.
+
1) 120Hz monitor, cl_physfps 77 + cl_maxfps 120, 500Hz mouse<BR>
* [http://www.ccleaner.com/ ccleaner ]
+
2) 154Hz monitor, cl_physfps 77 + cl_maxfps 154, 500Hz mouse
* [http://www.lavasoftusa.com/ adaware ]
 
* USB mouse rate hack for Windows: [http://www.ngohq.com/news/15043-how-to-increase-usb-sample-rate-in-windows-vista-7-a.html HIDUSBF]. [http://www.youtube.com/watch?v=VxhAKJ-Dyes Video guide]
 
* USB mouse rate hack for Windows 2000/XP/2003 only: [http://www.softpedia.com/get/Tweak/System-Tweak/USB-Mouserate-switcher.shtml USB Mouserate Switcher 1.1]
 
* [http://tscherwitschke.de/mouseratechecker.html Mouse rate checker]
 
  
= TFT screens =
+
even better 1): 120Hz monitor, cl_physfps 77 + cl_maxfps 240, 500Hz mouse<BR>
See [[TFT]] for some tips if you're using a TFT (LCD) monitor.
+
even better 2): 154Hz monitor, cl_physfps 77 + cl_maxfps 1001, 1000Hz mouse
  
=OS-specific settings=
+
In any of these cases you can use you can try setting the cl_maxfps to 77, 154, 231, 308, 385, 462, 539, 616, 693, 770, 847, 924, 1001, 1078, 1155, 1232 and so on...
  
Other settings depend on the Operating system you are using. See below for OS-specific tips.
+
===Mouse===
 +
Use ''in_mouse 3'' (Raw Input), or if that doesn't work ''in_mouse 2'' (Direct Input).
  
==Linux==
+
==Other OS==
 +
===Linux===
  
 
See [[Smooth Quake in Linux]]
 
See [[Smooth Quake in Linux]]
  
== Macintosh ==
+
=== Macintosh ===
Ezquake is in general the recomended client, but you can also try fuh if everything fails :P
+
ezQuake is in general the recomended client, but you can also try fuh if everything fails :P
 
Binary version of Fuhquake > http://dreamolers.binaryriot.org/fuhquake/
 
Binary version of Fuhquake > http://dreamolers.binaryriot.org/fuhquake/
  
 
+
==Finding help==
<BR><BR>
+
[http://www.quakeworld.nu/forum/viewforum.php?id=10 Advanced Configuration] forum in QuakeWorld.nu is a good place to start. Use search.
If nothing helps please come to irc  #qwrookie and we will try to fill in the missing pieces
 
  
 
[[Category:Tutorials]]
 
[[Category:Tutorials]]
 
[[Category:ezQuake]]
 
[[Category:ezQuake]]

Revision as of 15:48, 7 June 2010

This page contains solutions and tips for various tearing, lagging, jerky and sucky Quake configurations.

Hardware and drivers

Display

A good display for Quake has high refresh rate (Hz). There is no clear answer as to how high is enough. 154Hz (two times physics rate) is a nice number, but practical difference to 120Hz is not great.

If you have an LCD display with a high input lag, you should consider other options. Maybe you have an old CRT monitor you could resurrect for Quake use or simply buy an 120Hz LCD. See TFT for some tips if you're using a TFT/LCD monitor.

On CRT displays you can lower resolution to achive higher refresh rates. Your video card drivers probably have a custom refresh rate feature. If not, you can use an external program like Powerstrip or Refresh Lock.

Mouse

USB polling rate should be raised to 500Hz or 1000Hz from the default 125Hz. Some mouse drivers have this option, otherwise use HIDUSBF. Video guide

CPU spikes

If you feel like the game runs smooth for a while but you recognize small disturbing semi-periodic interrupts, those can be caused by background applications. Start by opening Task Manager (ctrl+alt+del) and checking whethe some other processes are consuming the CPU time.

If that doesn't help you, use following tools:

  • Process Explorer - Contains CPU Usage graph where you can track for CPU spikes and display what process is causing them. If it's the "System" process, check for wrongly uninstalled/conflicting firewalls or buggy drivers.
  • FileMon - Simple tool to show you which Windows applications are accessing your hard-drive
  • In Windows 7, you can use Resource Monitor: enter "resmon" in start menu search box.

Other issues

  • Threaded optimization can cause unstable frame rate if you have multicore CPU and NVIDIA video card; You can turn it off in video card driver settings.

ezQuake settings

Independent physics

Independent physics separates frame rate from physics rate allowing frame rates above 77.
cl_independentphysics 1
cl_physfps 77 equals the setting on almost all servers.
cl_nolerp 0 (default) disables linear interpolation of objects in the game.
cl_nopred 0 (default) prediction for your character is enabled.

FPS limit fine-tuning

Don't set cl_maxfps to 0. Define a limit, based on the power of your pc. The more the better, but you want a stable value, so you got to figure that number out. The number you choose must be related on your monitor's refresh rate. cl_maxfps can be equal, double, triple, 10 times the value of refreshrate. This usually delivers good results. Just don't set it too high, you want stable fps.

Especially with LCD devices be aware if your FPS limit (cl_maxfps) is a multiplication of your display refresh frequency. For example using 75 Hz display refresh frequency and FPS limit 225 (= 3*75) will be significantly different from using 235 FPS.

Setting cl_maxfps to a value that is below your systems limit also lends cpu time to other processes. This alleviates problems with mouse responsiveness (mouse driver) and CPU spiking (other programs).

Vsync fine-tuning

While vertical synchronization introduces image lag and forces one to use lower FPS rates than possible with unlimited FPS, on some configurations when fine-tuned it gives much smoother gameplay than when turned off.

To toggle vsync on, type vid_vsync 1 and cl_maxfps 0 in the console. Now you need to determine what is your video lag and FPS. Type show vidlag and show fps; You should use new hud (scr_newhud 1) to have these counters visible. The goal is to have stable FPS equal to your display frequency (60 / 75 / 120 / 150 ...) while having the video lag as low as possible.

Start with setting cl_vsync_lag_fix 1. Your video lag might decrease now, but also FPS may decrease. This is where cl_vsync_lag_tweak comes into play. You have to find the lowest value of the _tweak variable that gives you stable FPS equal to the display frequency. Such a value will decrease the video lag as much as possible without breaking FPS stability. For example tweak set to 0 will decrease video lag to almost 0 ms, but most probably will shut down your FPS rate. And tweak 20 typically won't reduce video lag at all, even if your FPS is super-stable. So find some good value in between.

Tweaking the rates

These are usually good combinations of refresh rate, cl_maxfps and mouse rate.

Sync everything and you get smooth experience (125Hz monitor, 125fps, 125Hz mouse). Sync parts of it with very high refreshrates and you'll get smoother experience (150Hz monitor, 500fps, 500Hz mouse). To make it overkill, use very high refreshrates with slight desync (150Hz monitor, 13*77=1001fps, 1000Hz mouse).

1) 120Hz monitor, cl_physfps 77 + cl_maxfps 120, 500Hz mouse
2) 154Hz monitor, cl_physfps 77 + cl_maxfps 154, 500Hz mouse

even better 1): 120Hz monitor, cl_physfps 77 + cl_maxfps 240, 500Hz mouse
even better 2): 154Hz monitor, cl_physfps 77 + cl_maxfps 1001, 1000Hz mouse

In any of these cases you can use you can try setting the cl_maxfps to 77, 154, 231, 308, 385, 462, 539, 616, 693, 770, 847, 924, 1001, 1078, 1155, 1232 and so on...

Mouse

Use in_mouse 3 (Raw Input), or if that doesn't work in_mouse 2 (Direct Input).

Other OS

Linux

See Smooth Quake in Linux

Macintosh

ezQuake is in general the recomended client, but you can also try fuh if everything fails :P Binary version of Fuhquake > http://dreamolers.binaryriot.org/fuhquake/

Finding help

Advanced Configuration forum in QuakeWorld.nu is a good place to start. Use search.