Tweaking Counter-Strike: Source
This article is going to cover several aspects of getting more from the game we love to hate. Whether you're looking to get a constant framerate, or just sick of headaches from low refresh rates, I hope you find something in this article that helps you.

  • Getting the latest drivers for your nVIDIA graphics card
    Sorry, this article does assume you're using an nVIDIA based graphics card, this includes anything from a Riva TNT up to a GeForce 6800. If you want to write me an ATi graphics driver supplement to this document, please e-mail me.
  • Squeezing more frames from your graphics card
    This includes settings you can change in CSS, as well as driver tweaks to increase performance.
  • Its still not smooth enough
    Windows XP mouse acceleration problems? Refresh rate hurting your eyes? Engine tweaks aswell as Windows fixes



nVIDIA Drivers
OK first we're gonna want to head to www.nvidia.com to grab the latest drivers.


The site is pretty well straight forward, follow the links...




Generally, you should just be able to install straight over the top of your old drivers without any problems. If you don't feel comfortable doing this, you should be able to uninstall the old ones from the Add/Remove Programs control panel applet - if you find that nVIDIA Drivers aren't listed, you may be using some really out of date drivers, in which case you can probably look forward to a huge performance boost. After installing the new drivers, you'll have to reboot. You will find that the drivers will have set your desktop resolution back to 800x600, so you'll probably want to change this back to your normal resolution before continuing :)

In case anyone was wondering, these drivers will support all of the following cards:
TNT2 / TNT2 M64
GeForce 2 / MX400
GeForce 4 / MX440
GeForce FX (All of them)


Getting more FPS
CSS options aside, the best way to get more performance (and this includes all your games) is to tweak up your drivers. Follow the screenshots below to find the driver configuration page.




The menu on the left will slide out when you find this tab, mines called GeForce FX 5900XT because that's the card I have, yours will say GeForce 2 MX400 or similar. First tab we're gonna want to hit is Performance & Quality Settings. Ignore the Application profiles as we're just going to set all these settings globally (hence Using global driver settings). Now under Global driver settings, we're gonna want to change the View type dropdown box to Advanced settings. It's the top three settings that concern us at the moment. Untick Application-controlled and set both Antialiasing settings and Anisotropic filtering to Off.

Next ensure that the Image settings slider is set to High performance - note this can have some strange side affects depending on your graphics card. If you're desperate for frames, you won't probably won't give a shit, but if you're an eyecandy junky, then the odd discoloration of textures might annoy you. You really have to play with the slider to determine which settings are best for you. I use mine on High performance and I barely notice the artifacts.

CSS Video Options
Now the other way to increase performance, is to change your graphics settings within CSS. The results from this can vary drastically, it can also depend on which version of Direct X you are using, which I will cover further down.



Fire up CSS, click on Options then go to Video. Here you can select your resolution (I use 1024x768) and change other various details. If you find CSS is really dark, you might want to use the brightness level slider under Adjust brightness levels to increase your gamma. We're going to be focusing on the options under the Advanced button. See below.



Okay first option is Model detail. This applies to both player and weapon models. Your first instinct is probably to set this to Low, however I find that for increased visibility at range, you really need Medium. This will not impact your frame rate as much as you might expect. The next and one of the most crucial options is Antialiasing mode. Naturally we turned this off in the nVIDIA Driver options earlier, however we're going to want to set this to None anyway.

Following that is Texture detail, this mainly applies to walls and floors and so on. Because we're after performance here, the best option is Low, this will reduce image quality noticably but increase your framerate. Next is Filtering mode. Most graphics cards should perform faster under Trilinear - unless you happen to be using an ancient 32MB card.

Water detail is rather self explanatory, since we don't really need alpha transparency with water for any of the maps in CSS, we're going to set this to Simple reflections. Shader detail also applies to water and other various graphical effects in the game, anyone using a GeForce MX graphics card, is going to want this set to Low, personally I get away with using High because of my DirectX level, more on this in a minute.

Shadow detail obviously sets the detail for all shadows in the game. While not a huge factor in framerate, I always set this to Low. Finally is Wait for vertical sync, probably one of the most highly debated options in any game. Set this to Enabled as we will need it later on.

DirectX
As many of you would be aware, Counter-Strike 1.6 (and previous versions) allowed you to select between OpenGL and Direct 3D for game rendering. For a long time, OpenGL was superior, although Direct 3D was always more widely supported. The Source engine is built entirely on Direct 3D, hence this option no longer exists. Certain grahpics chipsets support various DirectX versions at the hardware level. See the table below for more information.

chipset level
geforce 2 mx direct x 7.0
geforce 4 mx direct x 8.1
geforce 4 ti series direct x 8.1
geforce fx series direct x 8.1
geforce 6 series direct x 9.0


Most of you are undoubtedly using a card that runs DirectX version v8.1 at the hardware level. The software level for all cards will be DirectX v9.0 because this is a requirement for the game to run. During the BETA of CSS I discovered it was possible to force the hardware DirectX level down to a previous version to increase performance by up to 60%. Naturally you loose alot of the new effects and detail, hence why Shader detail has less of an impact on performance. There are two ways to force the source engine in to using a lower DirectX level (as you will note the dropdown box is greyed out).



To find the launch options box, simply right click on Counter-Strike: Source from your Games menu, and select Properties. Then click on the button labelled Launch options. Here you can specify command line options for the game, similar to the way you would have launched CS 1.5 by adding -game cstrike to your hl.exe shortcut. In this field we're going to want to add -dxlevel 70. You can test if it worked by launching CSS and checking in your Advanced Video options. The other way to set the game to DirectX 7.0 is to add mat_dxlevel "70" in to your config file. This should give you a nice boost in framerate, and increase visibility (at the cost of image quality).

CSS Variables
This section is going to cover some of the C variables (cvars) you can set within the game to increase visibility, and performance. The best way to enter these is in to a config (.cfg) file, such as userconfig.cfg. If you don't know what that is, or how to make one, you might want to skip this section as explaining configs is a little out of the scope of this article. If you do have a config file, then fire up your favorite text editor and get ready to add some new lines.

cvar value result
cl_dynamiccrosshair 1 This should be enabled by default, this will resize your crosshair according to your firing accuracy.
cl_ejectbrass 0 Turns off ejecting bullets from your weapon model as you fire
cl_phys_props_enable 0 Disables annoying world elements like cans and bottles
cl_radartype 1 1 = standard
cl_ragdoll_physics_enable 0 Disables dead bodies flipping over the place
fog_enable 0 turns off fog for increased visibility
mat_bumpmap 0 turns off bump mapping for increased performance
mat_dxlevel 70 sets direct X level (70, 81, 90)
mat_mipmaptextures 1 enables mipmapping (should be on by default)
mat_specular 0 disables specular lightning, increases performance
mat_vsync 1 enables vertical sync
r_3dsky 0 turns off fancy sky
r_drawrain 0 disables rain effect
r_dynamic 0 disables dynamic lightning
r_shadows 1 enables / disables player shadows
developer 1 turns on developer mode for verbose console output
fps_max 101 sets maximum framerate, more on this later
cl_crosshairalpha 200 sets transparency value of crosshair
cl_crosshaircolor 2 sets colour of crosshair
cl_crosshairscale 800 sets size of crosshair (higher = smaller)
cl_crosshairusealpha 1 enables transparency for crosshair
m_filter 0 mouse filtering smoothes input averaged over last two frames, can decrease accuracy
zoom_sensitivity_ratio 1.0 ratio for normal sens when zoomed (1 = same, 2 = double)
cl_cmdbackup 2 buffer for failed outgoing network packets
cl_cmdrate 30 number of packets to send to server
cl_downloadfilter nosounds disables downloading off server mod sounds (killing spree etc)
cl_interp 0.1 this one shouldnt need explaining
cl_interpolate 1 uses value of cl_interp
cl_lagcomp_errorcheck 1 check for errors in lag compensation
cl_rate 10000 outgoing packet rate
cl_updaterate 20 number of packets to recieve from server
rate 20000 sets incoming rate

By far the most useful of these cvars are cl_phys_props_enable and cl_ragdoll_physics_enable. Turning both off is a great way to increase visibility within the game. Another cvar worth a mention is cl_interp, those familiar with 1.5/1.6 will recognise this as ex_interp, a value often modified by professional gamers to increase the accuracy of player prediction (at the cost of animation frames). In an ideal world, model interpolation wouldn't be neccessary, however most servers send no more than 20 frames of game action per second, the other 80 or so are all generated by guessing.

If you're looking for a simple CFG file with all of these settings, here's a link to mine, feel free to modify it to suit your own needs, it includes all the forementioned cvars as well as a few extras. Simply place it in your cstrike\cfg folder and rename it userconfig.cfg if you want to use it. You can download it here.

Tweaking your Monitor
Well now that FPS shouldn't be a problem, we can work on matching up your resolution, refresh rate, and also setting up vertical sync - the proper way. Further down we'll also cover tweaking your Windows USB mouse drivers. Before we begin, I just want to say that I take no liability if you somehow manage to screw up your Windows installation, which I very mouch doubt you will if you follow the instructions.

At this point, it would help if you decided on one resolution to play CSS in, I personally use 1024x768 however you may want to use a lower resolution for a higher refresh rate, depending on your fps and what your monitor supports :) Now we need to find out which refresh rate your monitor will support this resolution at. This is simply a case of trial and error with your Desktop properties. If your monitor supports DPMS (and there's a good chance it does) then Windows XP should have already determined what resolutions and refresh rates your display is capable of - let's just double check before we go any further.


Right click your Desktop and go to Properties, click on the Settings tab and hit Advanced, now select the Adapter tab and you should be presented with a screen similar to the above. Click on the List All Modes button and scroll up (or down :) to the resolution you play CSS in. Start with the highest refresh rate (probably 85Hz for standard 17" CRT monitors) and click OK. Now press Apply.

Windows will now attempt the resolution and refresh rate on your desktop, if after flickering your monitor displays an Out of Range error or similar, simply press the N key on your keyboard, or wait 15 seconds and Windows should automatically change back to your previous resolution and refresh rate. If you like, you may wish to determine which refresh rates your monitor supports in all common resolutions so we can set these for other games later aswell. For example (640x480 = 120Hz, 800x600 = 100Hz, 1024x768 = 85Hz, 1280x1024=60Hz).

A note on LCD monitors.
Most LCD monitors have a native resolution at which they are designed to run, this is typically the highest resolution the display will support. For 17" monitors, this will be 1280x1024 at a maximum of 60Hz. For lower resolutions, your monitor should support 75Hz, but not higher. Note that running the monitor in a resolution below the native one, will result in stretching of the picture. Most people have trouble seeing the difference in games, so for the extra 15Hz it may be worth running your game in a resolution lower than the native one.


Now we need a little program which will enable all the hidden menus within the nVIDIA driver properties. Including clock frequency settings, aswell as Refresh Rate overrides for full screen resolutions. Contrary to popular belief, setting the refresh rate in the List All Modes box will not change your refresh rate in fullscreen games. For years, drivers have defaulted to 60Hz in fullscreen mode, regardless of Windows' desktop settings. NVTweak is the program we need to do this. You can cut straight to the download link for the latest version (at time of writing) here. This is relatively straight forward to install, launch the program from the Start Menu and you should be presented with a dialog like this.


Make sure Power User is ticked and then hit Enable All, then close the program. Now we should have a lot of extra menus within our nVIDIA driver properties. The first thing we want to do, is Enable vertical sync. This will ensure that our framerate will match our refresh rate (this is important to prevent screen tearing). Many people will tell you that you'll get more FPS by turning it off, this is technically true - however if your graphics card is producing 200 FPS and your monitor is refresh 60 times per second (60Hz) then you're only going to see 60 of the 200 frames.


Here we can see, under Performance & Quality Settings, scroll down the Global driver settings until you reach Vertical sync, untick Application-controlled and change the slider bar to On. Next we're going down to Refresh Rate Overrides. As you can see below, this is simply a matter of selecting Override refresh rates and then selecting our desired Refresh from the dropdown boxes which appear when clicking on Default for any resolution. I've set my CSS resolution of 1024x768 to 100Hz, as well as some other resolutions to different refresh rates for other games.


Now we should be able to get any framerate we want, however because vertical sync is enabled, we will be peaking at whatever our refresh rate is set to (which is exactly what we want). We need to set the following cvars to ensure CSS does exactly what it's told at all times.

cvar value result
fps_max 101 to ensure we do not get any screen tearing
mat_vsync 1 this tells css we're using vertical sync
m_filter 0 we no longer to smooth our mouse over the last two frames as we have a set framerate
cl_showfps 1 shows our current framerate

If all went well, you should be sitting at a constant framerate matched to your refresh rate with no screen tearing. My CSS runs happily at 100.1fps with my monitor at 100Hz with no framerate drops. If your framerate is dropping, you may need to considering lowering refresh rate or changing your detail settings (see the above section for increasing your FPS).




Tweaking your Mouse
Next we're going to get rid of Windows' pesky pointer acceleration. Unticking Enhance pointer precision in our Mouse properties in Control Panel unfortunately doesn't do the trick, this is because Windows uses DirectX to handle mouse input in fullscreen applications. There's two ways to get around this, depending on your mousing preferences. The first and most simple way is to add these three commands to our Launch Options:

-noforcemaccel -noforcemparms -noforcemspd

The second and most permanent solution, which will apply to all your games, is to change Windows' acceleration values which are stored in the system registry. Seeing as most people don't like playing with their registry, I have created a small .reg file you can download and run to automatically change the settings for you. You can grab the fix file here, and if you want to reverse the patch, run the original settings here. After this, you need not run any of the above command line parameters to remove pointer acceleration.

Speaking of mouse input, brings us to the final part of this guide. For those of you using PS/2 Mice, you'll need a program called PS/2 Rate, available here. This program allows you to increase your mouse rate in real time, beware though as sometimes this can have all kinds of strange side affects.

For those of us living in the 21st Century, we're using USB mice. Windows' USB drivers suck, and that's a fact - so why don't we replace them with some faster ones? Grab this program here.


By default, the Windows USB drivers run at 8ms (125Hz), although if you've got a decent mouse bought within the past 3 years, chances are it can support much higher. See the table below for a rough guide of mouse rates supported by various popular mice.

manufacturer model rate
Logitech MX300/310 500Hz
Logitech MX500 500Hz
Logitech MX510 1000Hz
Logitech MX700/900 250Hz
Microsoft Optical 250Hz
Microsoft IntelliEye 500Hz
A4 Tech Optical 250Hz


If you have luck with higher mouse rates with your mouse than on the above table, or if your mouse isn't listed. Please e-mail me and I'll update the information. Results will vary depending on your mouse, and your motherboard. It's also important to have your motherboard chipset drivers up to date, that's a little outside the scope of this article, but you should be able to find plenty of information on Google. Note that will you have to reboot after every change, and make sure you read the README so you know what to do if something goes wrong.

Credits
Thanks for reading, I hope that you've gained something from this guide, and I hope that you've managed to get your CSS running smoothly and at a constant frame rate. If everything didn't go as plan, go back to square one and try lowering some of your settings. I'd much rather play at 75Hz with 75FPS constant than play at 100Hz with between 80-100FPS. If you find any errors with this guide or want to add anything, please contact me via any of the methods below:



www.teqnohaxor.com