[BLOG] Optimizing Team Fortress 2
This applies for TF2, CS, CS:S, or basically any steam game by Valve.
When I built my new XP rig last week I immediately installed TF2 and Counter-Strike since those are my favorite MP games.
After playing TF2 for two nights I noticed a rather big problem.
I was getting really bad lag spikes within the game. Turning on the netgraph (net_graph 3 in the console) showed I was getting spikes where the choke would run high (30+) and I was often getting spikes where the graph would show basically nothing for 1-3 seconds.
So I would be running around in TF2, everything would just freeze for 1-3 seconds and usually when things resumed I found myself stabbed in the back by primesuspect. Needless to say it was very irritating.
A few things first. I know it was not a network issue because the game runs fine on my Macbook Pro - so the actual connection and my router is ruled out. Also I knew it wasn't a performance issue since I have a 9800gt 512mb card in my machine - more than enough for TF2.
If you happen to have issues similar to above I have a few suggestions.
1. Make sure you machine isn't bogged down with crap in the background or sneaky services. Certain services send out a ping ever X mins and can affect your internet play. Of course stuff running in the background can be equally bad. In my case I had everything shut down except Steam and was on a fresh XP install so this wasn't the case.
2. Defrag. As a heavy OSX and mild Linux user I often forget about the days of defragging. However jumping back on XP I was reminded of it's importance. Defrag your drive. Additionally you can defrag your TF2 game cache by right clicking on TF2 in the Steam game list and going to preferences. Browse through the tabs and you will find an option to defrag the TF2 cache. Do it.
3. Update your drivers (duh). When I installed XP I was using a custom SP3 disk that already included some of the newer drivers. Almost all my components were picked up and install out of the box (except for the NVIDIA drivers), I didn't have to do anything. Don't trust this. I went and installed latest chipset drivers, sound drivers, and Wifi drivers. I am using a Edimax wireless card so I opted to use their wireless client instead of Window's Wireless built in client. From my experience this is hit and miss. Some of the third party clients (Edimax and Intel off the top of my head) are much better than Windows while others are worse. Give it a run though, and see if it gives you a performance boost. The Edimax client is fantastic.
4. Optimize your rates. This, IMHO, made the biggest increase in my performance and seemingly fixed my problem - I think (still have to play a night full of TF2 to make sure). Back when I played Counterstrike 1.1 and 1.3 competitively the first thing you did was start config'in your rates (and believe me there was a long list). For whatever reason the default rates loaded were awful. Well that was ~5 years ago so when I was playing TF2 I didn't give any thought to it. I figured here we are years later things have probably improved and I didn't need any tweaking. Wrong. After a little poking around, sure enough, I applied the same rate changes I did over 5 years ago and saw an instant improvement in game.
Here is what I suggest. This is done in the developer console (~).
If you are still constantly getting stabbed in the back by primesuspect after everything is fixed you probably just suck.
Good luck.
When I built my new XP rig last week I immediately installed TF2 and Counter-Strike since those are my favorite MP games.
After playing TF2 for two nights I noticed a rather big problem.
I was getting really bad lag spikes within the game. Turning on the netgraph (net_graph 3 in the console) showed I was getting spikes where the choke would run high (30+) and I was often getting spikes where the graph would show basically nothing for 1-3 seconds.
So I would be running around in TF2, everything would just freeze for 1-3 seconds and usually when things resumed I found myself stabbed in the back by primesuspect. Needless to say it was very irritating.
A few things first. I know it was not a network issue because the game runs fine on my Macbook Pro - so the actual connection and my router is ruled out. Also I knew it wasn't a performance issue since I have a 9800gt 512mb card in my machine - more than enough for TF2.
If you happen to have issues similar to above I have a few suggestions.
1. Make sure you machine isn't bogged down with crap in the background or sneaky services. Certain services send out a ping ever X mins and can affect your internet play. Of course stuff running in the background can be equally bad. In my case I had everything shut down except Steam and was on a fresh XP install so this wasn't the case.
2. Defrag. As a heavy OSX and mild Linux user I often forget about the days of defragging. However jumping back on XP I was reminded of it's importance. Defrag your drive. Additionally you can defrag your TF2 game cache by right clicking on TF2 in the Steam game list and going to preferences. Browse through the tabs and you will find an option to defrag the TF2 cache. Do it.
3. Update your drivers (duh). When I installed XP I was using a custom SP3 disk that already included some of the newer drivers. Almost all my components were picked up and install out of the box (except for the NVIDIA drivers), I didn't have to do anything. Don't trust this. I went and installed latest chipset drivers, sound drivers, and Wifi drivers. I am using a Edimax wireless card so I opted to use their wireless client instead of Window's Wireless built in client. From my experience this is hit and miss. Some of the third party clients (Edimax and Intel off the top of my head) are much better than Windows while others are worse. Give it a run though, and see if it gives you a performance boost. The Edimax client is fantastic.
4. Optimize your rates. This, IMHO, made the biggest increase in my performance and seemingly fixed my problem - I think (still have to play a night full of TF2 to make sure). Back when I played Counterstrike 1.1 and 1.3 competitively the first thing you did was start config'in your rates (and believe me there was a long list). For whatever reason the default rates loaded were awful. Well that was ~5 years ago so when I was playing TF2 I didn't give any thought to it. I figured here we are years later things have probably improved and I didn't need any tweaking. Wrong. After a little poking around, sure enough, I applied the same rate changes I did over 5 years ago and saw an instant improvement in game.
Here is what I suggest. This is done in the developer console (~).
cl_updaterate 100 (default is 33) cmdrate 100 (default is 33) rate 25000 (default is 20000)So if you are having some issues with TF2, CS, or any of the Valve games the things above might be something to look into.
If you are still constantly getting stabbed in the back by primesuspect after everything is fixed you probably just suck.
Good luck.
0
Comments