How can I make TF2 run faster?

I experience alot of lag when I play in large servers, is there anyway of turning down the quality of the graphics in the game, or changing anything to make it render faster?


Solution 1:

There are a lot of things that can affect your FPS when playing TF2, and not all of them are TF2-specific. I've listed a lot of things below, but I will preface this with one thing: make some minor tweaks/changes and test them out in-game before making more changes.

Not only will this help if something goes wrong (you'll know which setting caused the issue), but if you find that you're happy with the current settings, you won't need to make unnecessary changes to your configurations.

External Programs

Antivirus

Antivirus Programs can adversely affect your PC's performance by constantly checking temp files that are created when playing.

Specifically related to Steam, there is this folder (path may vary depending on where you installed Steam to):

C:\Program Files (x86)\Steam\appcache\stats

This 'stats' folder is constantly updated while you play TF2, and thus a lot of antivirus programs will be constantly checking this folder as files are added, updated, or removed, costing you CPU time.

Most antivirus software allows you to add folders as an exception, so check your Antivirus settings. If no such option exists, you should (temporarily!) disable your antivirus whilst playing TF2, and reenable it after you're done.

Startup Programs

Some programs such as Dropbox, Google Update, Adobe Updater and others (including Steam!) tend to set themselves to start when your PC is turned on. While this can be great for keeping things up to date, you may find that your gaming is adversely affected by such programs running in the background.

You can either close them every time by using 'End Process' with Task Manager, or remove them from startup entirely.


Steam Options

Disable Overlay

The Steam overlay can be taxing to less-powerful PCs, and can be enabled/disabled from within the Steam settings:

  • Go to your Steam Library
  • Right Click on Team Fortress 2, and go to Properties
  • On the 'General' tab, uncheck the 'Enable Steam Overlay' option:

TF2 Properties


TF2 Tweaks

Finally, onto some actual TF2 configuration.

TF2 In-game options

From the in-game TF2 Menu, click 'Options' -> Video -> Advanced

Advanced

A lot of these will be overridden with a custom config file, but if you choose not to go down that route, these are the settings you'll need to tweak in-game.

Basically, you want to lower/turn off most of these advanced settings:

  • Drop all 'detail' dropdowns (Model, Shadow etc) to 'Low',
  • Disable the 'bloom' setting
  • Set High Dynamic Range and Anti-aliasing to 'None'

and so on.

TF2 Launch Options

Dirext X Level

From Steam, open up the TF2 Properties Window again, and click on 'Set Launch Options'. You can force the game to run on an older version of DirectX, by specifying this Launch Option:

-dxlevel 81

This sets your DirectX level to 8.1. However, Note that with the new 'Meet your Match' update, Competitive mode requires DirectX 9 or higher, so if you plan to play in competitive mode the lowest you can go is:

-dxlevel 90

Also note that once set and launched, the changes made are permanent, so if you want to revert this change, you should change it to run with Direct X 9.8 i.e:

-dxlevel 98

Other launch settings

Add these based on your preference. You can run the game windowed instead of fullscreen. Adjust the width and height to match your monitor's output.

-windowed -noborder -w 1920 -h 1080 

You can also disable the startup videos, and enable the console on startup:

-console -novid

Autoexec Config

TF2 has a lot of hidden settings that aren't apparent in the 'Video' options. Below is the configuration that I have used on my own terrible laptop. It's based on Kapito's dxlevel 90 config. It includes tweaks such as disabling ragdolls, weather, lighting effects and other things that are known to impact performance.

I do have a single tweak of my own:

Reduced number of decals:

mp_decals 1

Decals are used for visual effects like bullet impacts/holes, visible sprays, and other visual effects. Kapito had this set to '4', I prefer to reduce it to '1'. Though the change is minimal, higher numbers do give more persistent decals at the expense of some performance, so I set it to the barest of minimums.

Copy and paste the following settings into your autoexec.cfg file at

C:\Program Files (x86)\Steam\SteamApps\common\Team Fortress 2\tf\cfg. 

If you can't see an autoexec.cfg file, you can just make one, TF2 will pick it up automatically.

fps_max 0; 
mat_shadowstate 0; 
r_shadowmaxrendered 0; 
r_shadowrendertotexture 0; 
r_shadows 0; 
cl_ragdoll_fade_time 0; 
cl_ragdoll_forcefade 1; 
cl_ragdoll_physics_enable 0; 
g_ragdoll_fadespeed 0; 
g_ragdoll_lvfadespeed 0; 
ragdoll_sleepaftertime 0; 
cl_phys_props_enable 0; 
cl_phys_props_max 0; 
props_break_max_pieces 0; 
r_propsmaxdist 1; 
violence_agibs 0; 
violence_hgibs 0; 
r_eyes 0; 
r_flex 0; 
r_lod 2; 
r_rootlod 2;
r_teeth 0;
cl_hud_playerclass_use_playermodel 0;
cl_jiggle_bone_framerate_cutoff 0;
mat_antialias 0;
cl_muzzleflash_dlight_1st 0;
cl_detaildist 0;
cl_detailfade 0;
cl_drawmonitors 0;
cl_ejectbrass 0;
cl_new_impact_effects 0;
cl_show_splashes 0;
func_break_max_pieces 0;
lod_transitiondist 0;
mat_colcorrection_disableentities 0;
mat_colorcorrection 0;
mat_disable_bloom 1;
mat_disable_fancy_blending 1;
mat_trilinear 0;
mat_disable_lightwarp 1;
mat_envmapsize 8;
mat_envmaptgasize 8;
mat_filterlightmaps 0;
mat_filtertextures 0;
mat_forceaniso 0;
mat_hdr_level 0;
mat_max_worldmesh_vertices 512;
mat_motion_blur_enabled 0;
mat_parallaxmap 0;
mat_picmip -1;
mat_reducefillrate 1;
mat_reduceparticles 1;
mat_wateroverlaysize 1;
mp_decals 1;
r_3dsky 0;
r_ambientboost 0;
r_ambientfactor 0;
r_ambientmin 0;
r_avglight 0;
r_cheapwaterend 1;
r_cheapwaterstart 1;
r_maxmodeldecal 9;
r_decalstaticprops 0;
r_decalstaticprops 0;
r_decal_cullsize 15;
r_drawdetailprops 0;
r_drawmodeldecals 0;
r_drawflecks 0;
r_dynamic 0;
r_flashlightdepthtexture 0;
r_forcewaterleaf 1;
r_lightaverage 0;
r_maxnewsamples 0;
r_maxsampledist 1;
r_occlusion 0;
r_propsmaxdist 0;
r_renderoverlayfragment 0;
r_staticprop_lod 4;
r_waterdrawreflection 0;
r_waterdrawrefraction 1;
r_waterforceexpensive 0;
r_waterforcereflectentities 0;
r_drawtracers_firstperson 0;
rope_averagelight 0;
rope_collide 0;
rope_rendersolid 0;
rope_rendersolid 0;
rope_rendersolid 0;
rope_shake 0;
rope_smooth 0;
rope_subdiv 0;
rope_wind_dist 0;
tf_particles_disable_weather 1;
tracer_extra 0;
violence_ablood 1;
violence_hblood 1;
mat_phong 0;

Conclusions

Honestly there's a lot that will depend on your PC. There are plenty of guides out there, nevermind the few that I've linked below, so you should do some research of your own and tweak these settings until you get a level that you're comfortable with running.

References:

  • LowSpecGamer - TF2 Settings
  • How-To Geek - Disabling programs from Startup
  • For Dummies - Ending Processes
  • Reddit - Kapito's Easy Potato FPS Config
  • TF2Mate - Graphics config