Difference between revisions of "Smooth Quake"

From QWiki
*>Ruskie
m (fixed upstream)
*>Fog
(36 intermediate revisions by 6 users not shown)
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.
  
== Operating system independant ==
+
==Hardware and drivers==
===Independent physics===
+
===Display===
You can find lots of tips for the ezQuake client in the [http://ezquake.sourceforge.net/docs/?independent-physics Independent Physics Guide].
+
A good display for Quake has high refresh rate (Hz).
 +
<br>
 +
If you have an LCD display with a high [http://en.wikipedia.org/wiki/Input_lag input lag], you should consider other options for ultimate smoothness. 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 or you are thinking of buying one.
  
===Common tips===
+
On CRT displays you can lower resolution to acheive 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.
* '''More FPS''' = smoother quake. See below for details.
 
* Use '''maximum vertical refresh frequency''' of the screen
 
* Make sure that '''no other program is running''' when you run quake. They steal your CPU and therefore make FPS hits.
 
* 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.
 
  
===FPS Limit Fine-Tuning===
+
===Mouse===
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. Usually players prefer to use multiplication of their display refresh frequency - 2*75, 3*75, 3*60, and so on, not the other way round.
+
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]
  
===Control CPU Sharing===
+
===CPU spikes===
Because your CPU needs to be shared with different system applications - including system services - it gives you another place to fine-tune smoothness of your Quake configuration. You can get into following situations.
+
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.
  
* Both Quake and background services get enough CPU time and everything runs smooth
+
If that doesn't help you, use following tools:
* Other applications get too much CPU time while the Quake engine needs more so the rendering gets jerky
 
* Other applications do not get enough CPU time and for example your mouse/keyboard input is delayed for more then a second
 
  
To control how CPU should be shared when Quake is running you can use ways described below.
+
* [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
 +
* In Windows 7, you can use Resource Monitor: enter "resmon" in start menu search box.
  
====Quake CPU yielding====
+
===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.
  
If you use FPS limitation (cl_maxfps), you can control what happens in the moment when the client finished rendering the current frame and it has nothing to do until it's a right time to start rendering the next frame. Either it can run in a loop or it can give CPU to other applications. To control it use <code>sys_yieldcpu</code> variable. Setting it to 0 will not give the CPU to other applications and vice versa.
+
==ezQuake settings==
 +
These settings only work on [[ezQuake]] client.
  
====OS-specific 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) set to 1 to disable linear interpolation of objects in the game (not recommended).<BR>
 +
''cl_nopred 0'' (default) prediction for your character is enabled.<BR>
 +
''cl_earlypackets 1'' lowers net latency and reduces "warpyness" [http://www.quakeworld.nu/news/482/]. If you get jerky rockets, consider turning this off and use ''show net'' (requires new hud enabled), then cl_delay_packet 0-10 until your min/avg/max ping is equal and dev preferrably is 0.00ms.
  
Other settings depend on the Operating system you are using. See below for OS-specific tips.
+
===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. Typical values on modern computers are 240 (120x2), 480, 600, 960... which should be more than enough to have a smooth playing experience.
  
==Linux==
+
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.
  
See [[Smooth Quake in Linux]]
+
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.
  
== Windows ==
+
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.
  
====Quake Priority====
+
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.
  
You can try changing Quake process priority. You do that with the <code>sys_highpriority</code> variable in FuhQuake and ezQuake clients. Try all values from within the set -1, 0 and 1. Also you may try more specific values by selecting your client process in the ''Task Manager'' and changing it's priority in there. ''Task Manager'' gives you 6 possible priority settings.
+
===Mouse===
 +
Use ''in_mouse 3'' (Raw Input), or if that doesn't work ''in_mouse 2'' (Direct Input). Type ''in_restart'' to restart input mode.
  
====System CPU Sheduling====
+
==Other OS==
 +
===Linux===
  
In Windows it's possible to set preferred way for '''CPU sheduling''' in your Control Panel - System - Advanced tab - Performance - Advanced tab and choose if ''Programs'' or ''Background services'' should be preferred. The default setting for workstation computers is to prefer ''Programs''. However this doesn't mean that this value is recommended.
+
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/
  
== Debugging/solutions for Certain hardware ==
+
==Finding help==
if you get pixels in ezquake, try gl_ztrick 0 or 1
+
[http://www.quakeworld.nu/forum/viewforum.php?id=10 Advanced Configuration] forum in QuakeWorld.nu is a good place to start. Use search.
 
 
== Tools ==
 
If you dont have quake installed already use [[NQuake]] as the installation media.
 
* http://nquake.com
 
 
 
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)
 
* http://www.nvidia.com/content/drivers/drivers.asp
 
* http://ati.amd.com/support/driver.html
 
* http://www.omegadrivers.net/
 
 
 
 
 
Also 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.
 
* Powerstrip or PCWizard or newest Nvidia drivers - With these programs u can fine-tune your display frequency. If you dont use independent-physics, it might be a good idea to set your quake's resolution display frequency to 77hz. Or 154 if you have at least 19' monitor.
 
These tools are good to clean up space/bogus stuff in Windows that can steal precious fps:
 
*[http://www.ccleaner.com/ ccleaner ]
 
*[http://www.lavasoftusa.com/ adaware ]
 
 
 
If nothing helps please come to irc  on #qwhelp and we will try to fill in the missing pieces
 
  
 
[[Category:Tutorials]]
 
[[Category:Tutorials]]

Revision as of 21:38, 1 November 2012

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).
If you have an LCD display with a high input lag, you should consider other options for ultimate smoothness. 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 or you are thinking of buying one.

On CRT displays you can lower resolution to acheive 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

These settings only work on ezQuake client.

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) set to 1 to disable linear interpolation of objects in the game (not recommended).
cl_nopred 0 (default) prediction for your character is enabled.
cl_earlypackets 1 lowers net latency and reduces "warpyness" [1]. If you get jerky rockets, consider turning this off and use show net (requires new hud enabled), then cl_delay_packet 0-10 until your min/avg/max ping is equal and dev preferrably is 0.00ms.

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. Typical values on modern computers are 240 (120x2), 480, 600, 960... which should be more than enough to have a smooth playing experience.

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.

Mouse

Use in_mouse 3 (Raw Input), or if that doesn't work in_mouse 2 (Direct Input). Type in_restart to restart input mode.

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.