Team Fortress 2

Team Fortress 2

579 ratings
What is lerp/rates for Dummies
By sheo
Too few people know that it is necessary to set up their connection to SourceEngine gameservers for better gameplay experience. This guide is intended to explain as much as possible as simply as possible. Team Fortress 2 will be used as an example. And yes, this guide is intentionally put into GameplayBasics category.
7
   
Award
Favorite
Favorited
Unfavorite
What is lerp?
Lerp is a delay, intentionally added to the game by Valve for smoothing movements of players who use unstable internet connection. Every player is able to set the delay time (100ms or 0.1s by default). Default value is too much exaggerated from what most players need. Actually, it's made for people who use 3G modems for playing multiplayer games.

However, as of 2015, most players have decent PCs with at least 2 cores inside and fast stable connection. Thus, increased lerp value becomes almost useless. The shorter the lerp time is, the more the game state on your screen matches the one on the server. If you have a faster reaction than a 60 year old granny, setting lerp time is what you have to do. Gameplay quality will be greatly increased.

Pros of reducing lerp time:
  • Reduced delay between pressing a mouse button and hit registration. (when using accurate weapon)
  • More realistic Demoman and Soldier projectiles: once a player shoots, the projectile appears right near his gun and flies through the map evenly, instead of spawning in the middle of nowhere and teleporting to your face.
  • In order to hit a target, you need to aim directly at it, instead of predicting its actions the next split second. Works for both projectiles and bullets.

Cons of reducing lerp time:
  • Better server quality is required. In order to provide smooth gameplay, the server must have stable FPS (yes, the server has FPS too) and correct connection settings on its side. Default settings are not considered correct for a good server.
  • In case of another player having an unstable connection, which is unable to send packets evenly, he will lag on your screen. If you use projectile weapon you will handle it, but in case of really laggy players shooting from accurate weapon will prevent you from killing the target.

You can change your lerp time by using console command cl_interp <time>, where <time> is lerp time in seconds. For example, cl_interp 0.035 (0.035 seconds is 35ms). I advise to try the least value (0) and gradually increase it if you meet any problems. Remember, that TF2 doesn't allow you to change the lerp time midgame: you will have to spectate or disconnect from the server entirely. Also, you will never have real lerp 0 if you set it. Almost all servers force their clients to use at least lerp 15.2ms
What is rates?
Rates is a frequency of data exchange with the server, measured in packets per second. Team Fortress 2 servers (without any special mods) generate game state 66.7 times per second, while clients (game on your PC) are set to 20/s for receiving and 30/s for sending by default. The more often you exchange data, the more the game state on your screen matches the one on the server (logic, ♥♥♥♥♥).

Pros of increasing rates up to 66:
  • The movements of other players look smoother.
  • More accurate hit registration.

There are no disadvantages of increasing rates up to 66, you will meet troubles only if your PC or internet connection can`t handle those settings. For example, if your FPS drops down below 66: obviously, a client is unable to send data more often than it processes frames on your screen. Next, if your connection is too weak you also will experience problems. In the midst of battle the traffic speed can grow up to 50Kb/s (same as 400Kbit/s), if your connection speed is less than this value, there is no point to change default rates. Also, you shouldn`t forget about connection stability: if your ping is jumping from 80 to 120 and vice versa all the time, you`d better to keep rates on lower value.

A separate paragraph should be devoted to the quality of the servers. As i mentioned in the Lerp section, the server quality requirements will increase after altering your netsettings. When you turn rates to their max values, those requirements go even further: each FPS drop (yes, the server has FPS too) below the value of 66, even for a second, causes a lag on your screen. That`s why, before blaming my guide for not working you should make sure that the server you are playing on is good enough, and you are not playing on a laggy **** like official Valve servers.

You can change your rates by using console commands: cl_cmdrate <num> - sending and cl_updaterate <num> - receiving.
Conclusion
I doubt, that you understand how to set up your netsettings right after reading my guide, that`s why i prepared a few good configurations for all types of PC and internets, from the best to the worst. Start from the best, and if you meet problems (stable lags on all servers) try worse one. Remember, that in order to save these setting after next game launch, you should add them to your autoexec.cfg

Ideal
cl_cmdrate 66; cl_updaterate 66; cl_interp_ratio 1; cl_interp 0.0151515; rate 66000

A little bit worse
cl_cmdrate 50; cl_updaterate 50; cl_interp_ratio 1; cl_interp 0.023; rate 50000

Why not, if laggy otherwise
cl_cmdrate 40; cl_updaterate 40; cl_interp_ratio 1; cl_interp 0.04; rate 40000

3G modem, only default settings are worse
cl_cmdrate 30; cl_updaterate 30; cl_interp_ratio 2; cl_interp 0.066666; rate 30000

There are some new variables that you may not know: rate and cl_interp_ratio. However, this guide is intended for players, and explaining each of these variables will not make any sense for them.
220 Comments
SKIBIDI TOILET 28 Jul @ 5:36am 
what is default settings
sheo  [author] 3 Mar @ 5:12am 
I don't think you can fix big chokes and lag spikes with lerp and rate settings
It's your internet issue (or the server's)
GeorgeFr19 3 Mar @ 3:47am 
I am having some problems with choke and occasional ping spikes on the net graph. It makes the characters' movements stutter and feel choppy during the spikes. Could I fix this by just trying different configurations of the settings in this guide or is there another fix I could try?
Smidge <3 3 Nov, 2024 @ 12:41am 
@Sitzkrieg
If your FPS drops below your cmdrate (66), you can observe the "out" value (3rd number on the right of the graph) drop to whatever your fps is, as well as gaps in the yellow line at the very bottom of the graph. This line indicates cmd packets.
_Sitzkrieg 3 Nov, 2024 @ 12:22am 
I could not find anything on the valve developer wiki, teamfortress.tv, etf2l, etc. proving that client FPS affects the NIC somehow. I still don't find this to be true. It just wouldn't make sense for functionally independent components to arbitrarily equate their intended function to in-game FPS.

I use the net graph every time I play the game. I have an alias set to bring up a netgraph anytime the scoreboard is displayed. I just never looked too deep into the sv value because usually I have issues with choke and loss, and there is also a totally separate FPS value in the netgraph called fps. I have also been working on a series of scripts and custom config files since 2014 and have never discovered this.

Crazy that there is still more to learn after all of that work and experience.

(2/2)
_Sitzkrieg 3 Nov, 2024 @ 12:21am 
https://developer.valvesoftware.com/wiki/Source_Multiplayer_Networking
https://developer.valvesoftware.com/wiki/TF2_Network_Graph

After doing some digging it does turn out to be true that the source engine reports a value under 'sv' which is supposedly server sided FPS, and it's totally separate from the client FPS value contained in the netgraph. What I don't understand is how the server client reports an FPS value when it is not rendering anything. Information about this is scarce. I wonder why source servers have an FPS when no other service I have hosted does. I have a cloud server and work as a network engineer. I host all sorts of things and have never seen anything like this.

(1/2)
Smidge <3 2 Nov, 2024 @ 11:42pm 
Sitzkrieg's never seen the net graph in their life. smh
sheo  [author] 2 Nov, 2024 @ 11:14pm 
>>>Servers do not have FPS
Yes they do, set net_graph 4 and see the server fps, it's labeled as "sv", and it's always equal or greater than tickrate

>>>FPS does not determine
It does in Source Engine games, such as TF2
_Sitzkrieg 2 Nov, 2024 @ 11:01pm 
"There are no disadvantages of increasing rates up to 66, you will meet troubles only if your PC or internet connection can`t handle those settings. For example, if your FPS drops down below 66: obviously, a client is unable to send data more often than it processes frames on your screen."

This is also factually incorrect. FPS does not determine the rate your network interface is sending information to the game server. In any given system the CPU and GPU could be at 100% utilization and the NIC can be at 10%. For as long as the NIC isn't flooded, other components will not effect the speed of network transmit and receive data. I also suggest adding cl_smooth 0 to this guide. It has to deal with interpolation and the positional accuracy of players on the server. Disabling it makes for a more 1:1 of what the server is 'seeing'.
_Sitzkrieg 2 Nov, 2024 @ 10:55pm 
"Cons of reducing lerp time:
Better server quality is required. In order to provide smooth gameplay, the server must have stable FPS (yes, the server has FPS too) and correct connection settings on its side. Default settings are not considered correct for a good server."
I have hosted many servers for various things in my life. Servers do not have FPS. They are not rendering anything. Servers have what is called a tick rate. It is a totally different thing.