Difference between revisions of "Lag compensation"

From Team Fortress Wiki
Jump to: navigation, search
m
(rewrite some parts, add external links)
Line 1: Line 1:
{{Stub}}
+
''Team Fortress 2'', being based on the [[Source Engine]], is generally configured to make use of '''lag compensation'''. Lag compensation is most commonly the technical reason behind cases of kills or actions that would otherwise seem infeasible in given circumstances; for example, when players perceive themselves to have been "shot through a wall" by a [[Sniper]], or [[Backstab]]s, being performed at the incorrect angle (known as ''[[Backstab#Issues|facestabs]]''), or otherwise missing entirely (known as ''[[Backstab#Issues|failstabs]]'').
Team Fortress 2, being built on the Half-Life 2 engine, is generally configured to use '''Lag Compensation'''. [http://developer.valvesoftware.com/wiki/Lag_Compensation]
 
 
 
This is the technical reason behind cases where players may believe they were "shot through a wall" (especially by Snipers), and may also explain a majority of perceived [[facestab]]s.
 
  
 
In a nutshell, when a high-latency (high-ping) player attacks, the server temporarily "rewinds" its copy of the action in order to compensate for their lag. For example, the enemy Sniper shoots when he sees your head, at that moment you and most other players may believe you successfully ran behind a wall. When the server receives the fire message from the Sniper, it "rewinds", finds out you ought to have been hit, and then deals damage, leading to the appearance of being "killed through a wall".  
 
In a nutshell, when a high-latency (high-ping) player attacks, the server temporarily "rewinds" its copy of the action in order to compensate for their lag. For example, the enemy Sniper shoots when he sees your head, at that moment you and most other players may believe you successfully ran behind a wall. When the server receives the fire message from the Sniper, it "rewinds", finds out you ought to have been hit, and then deals damage, leading to the appearance of being "killed through a wall".  
Line 8: Line 5:
 
This is an intentional engineering and design decision, a tradeoff to enhance the realism of attacks at the expense of the realism of taking damage. Were lag compensation disabled, many players would have cause to complain that they shot the enemy without inflicting any damage.
 
This is an intentional engineering and design decision, a tradeoff to enhance the realism of attacks at the expense of the realism of taking damage. Were lag compensation disabled, many players would have cause to complain that they shot the enemy without inflicting any damage.
  
==Exceptions==
+
== Exceptions ==
 
Projectile weapons such as [[rocket]]s, [[grenade]]s, and [[flare gun|flares]] are not lag-compensated. It is not clear whether the [[Syringe Gun]] or [[Flamethrower]] are lag-compensated. The [[Pyro]]'s [[compression blast]] is also not compensated, making it increasingly difficult to use at higher latencies.
 
Projectile weapons such as [[rocket]]s, [[grenade]]s, and [[flare gun|flares]] are not lag-compensated. It is not clear whether the [[Syringe Gun]] or [[Flamethrower]] are lag-compensated. The [[Pyro]]'s [[compression blast]] is also not compensated, making it increasingly difficult to use at higher latencies.
  
 
Spectators do not have lag-compensation. If you are spectating someone in first person, you are not seeing exactly what they are seeing. This is especially noticeable with high-latency snipers, where you should expect to see unusual shots that may appear to miss or jerk about from your perspective.
 
Spectators do not have lag-compensation. If you are spectating someone in first person, you are not seeing exactly what they are seeing. This is especially noticeable with high-latency snipers, where you should expect to see unusual shots that may appear to miss or jerk about from your perspective.
 +
 +
== See also ==
 +
* [[Backstab#Issues]]
 +
* [[Source Engine]]
 +
 +
== External links ==
 +
See the following links for in-depth technical explanation of how lag compensation works in the [[Source Engine]]:
 +
 +
* {{vdc|Lag compensation}}
 +
* {{vdc|Source Multiplayer Networking}}
 +
* {{vdc|Prediction}}
  
 
[[Category:Gameplay]]
 
[[Category:Gameplay]]

Revision as of 22:22, 28 August 2010

Team Fortress 2, being based on the Source Engine, is generally configured to make use of lag compensation. Lag compensation is most commonly the technical reason behind cases of kills or actions that would otherwise seem infeasible in given circumstances; for example, when players perceive themselves to have been "shot through a wall" by a Sniper, or Backstabs, being performed at the incorrect angle (known as facestabs), or otherwise missing entirely (known as failstabs).

In a nutshell, when a high-latency (high-ping) player attacks, the server temporarily "rewinds" its copy of the action in order to compensate for their lag. For example, the enemy Sniper shoots when he sees your head, at that moment you and most other players may believe you successfully ran behind a wall. When the server receives the fire message from the Sniper, it "rewinds", finds out you ought to have been hit, and then deals damage, leading to the appearance of being "killed through a wall".

This is an intentional engineering and design decision, a tradeoff to enhance the realism of attacks at the expense of the realism of taking damage. Were lag compensation disabled, many players would have cause to complain that they shot the enemy without inflicting any damage.

Exceptions

Projectile weapons such as rockets, grenades, and flares are not lag-compensated. It is not clear whether the Syringe Gun or Flamethrower are lag-compensated. The Pyro's compression blast is also not compensated, making it increasingly difficult to use at higher latencies.

Spectators do not have lag-compensation. If you are spectating someone in first person, you are not seeing exactly what they are seeing. This is especially noticeable with high-latency snipers, where you should expect to see unusual shots that may appear to miss or jerk about from your perspective.

See also

External links

See the following links for in-depth technical explanation of how lag compensation works in the Source Engine: