internet latency & effects on hit registration

Everything about latency. Tips, testing methods, mouse lag, display lag, game engine lag, network lag, whole input lag chain, VSYNC OFF vs VSYNC ON, and more! Input Lag Articles on Blur Busters.
Locked
nick4567
Posts: 118
Joined: 10 Mar 2019, 19:55

internet latency & effects on hit registration

Post by nick4567 » 01 Jun 2019, 21:44

you guys are a site known for great things and pushing the limits on technology but there is an issue which no hz rate or methods of reducing input lag could help and i was wondering if we could get the attention of say network engineers and what not to investigate the hit registration issues in fps games online when people can literally see you before you see them it makes the game very unfair and sometimes even unplayable
Last edited by nick4567 on 18 Jul 2019, 20:09, edited 2 times in total.

open
Posts: 223
Joined: 02 Jul 2017, 20:46

Re: internet latency

Post by open » 01 Jun 2019, 22:57

This is a common issue. Most games work like this but there are some variations to netcode from game to game that can impact how they play out.

The server typically updates each client with the positions and movement of all other players, even if those players are out of view. With any network delay, the positions of each player will be delayed by the time they reach the other clients. One way to cancel out the lag in the positions is to take the movement vector of each player and move them forward along that vector by the amount that they would have moved during the network delay. One name for this process is lag compensation. But lag compensation struggles in situations where movement and acceleration change in unpredictable ways.

For example one player runs in a straight line past a corner without stopping. The other clients will see that players position somewhat accurately since the lag compensation will be able to assume his lag, position, and movement vector accurately. The compensation will accurately place him slightly forward along his movement vector canceling out any effects of network lag. Other clients will be able to see him at the same time he sees them.

Another player runs up to the corner using a vector that will not expose him if he keeps going (for example he used a collision course with the corner). Since he was not on a path that would have exposed him if he kept going, he will not yet show up around the corner even with lag compensation. He then stops by the corner and presses a strafe key to move the very last movement that is needed to expose himself. Since he used an unpredictable acceleration, the lag compensation will not be able to cancel out his lag based on a known movement vector. And he will effectively show up around that corner with lag on enemy screens. And since his client already has the position of enemies around the corner he will see them before they see him. He essentially has an advantage equivalent to the network delay. And this can often be significant enough to give the enemies little to no chance vs him.

Lag compensation can also play out in different ways in different games. Overwatch for example will usually favor a hitscan shot if it is lined up on the client, despite lag playing a role in enemy positions. However it does run some checks to make sure it was still a fair shot. For example if you run toward a corner and stop right before you are exposed, the games lag compensation could make you show up around that corner for a split second on enemy clients. If a widowmaker hit a headshot on you, even though it lined up on her screen, it will not give her the kill. Because overwatch will check to make sure you actually ran past the corner on your client. This can be used to reveal if a widowmaker is watching a corner without any risk. Just strafe back and fourth as close as you can to the corner without exposing yourself. Since she will see you sometimes due to lag she will pop off a shot and by hearing it you are made aware of her. At a high level widowmakers are well aware of this and will hold back until you are slightly further past the corner to shoot.

A famous example of netcode in overwatch is the behavior of roadhogs hook. It used to just check if you were ever exposed and register a hook even if you got around a corner by the time your client was made aware that you got hooked. This felt so frustrating to the people getting hooked that they changed it to never reward a hook if you were out of sight on your screen.

All in all lag and lag compensation techniques are the best we have in most online gaming situations. It's best to learn to play with them to your advantage.

User avatar
Chief Blur Buster
Site Admin
Posts: 11647
Joined: 05 Dec 2013, 15:44
Location: Toronto / Hamilton, Ontario, Canada
Contact:

Re: internet latency

Post by Chief Blur Buster » 02 Jun 2019, 12:43

nick4567 wrote:you guys are a site known for great things and pushing the limits on technology but there is an issue which no hz rate or methods of reducing input lag could help and i was wondering if we could get the attention of say network engineers and what not to investigate the hit registration issues in fps games online when people can literally see you before you see them it makes the game very unfair and sometimes even unplayable
I invited Chris of Battle(non)sense to write an article about network lag, and here's The Basics of Network Lag – with Battle(non)sense.
open wrote:For example one player runs in a straight line past a corner without stopping.
[...]
That's a very interesting "lag compensation" scenario you've illustrated -- and how they can play to your advantage or disadvantage.

It would be nice to have overhead diagrams illustrating this, for a more pictorial illustration!
Head of Blur Busters - BlurBusters.com | TestUFO.com | Follow @BlurBusters on Twitter

Image
Forum Rules wrote:  1. Rule #1: Be Nice. This is published forum rule #1. Even To Newbies & People You Disagree With!
  2. Please report rule violations If you see a post that violates forum rules, then report the post.
  3. ALWAYS respect indie testers here. See how indies are bootstrapping Blur Busters research!

open
Posts: 223
Joined: 02 Jul 2017, 20:46

Re: internet latency

Post by open » 02 Jun 2019, 17:35

Yeah I think a video with 2 players overlayed, one representing an enemy clients actual position on his computer with no lag, and the other representing the lagged and lag compensated position as it shows up on other clients with the total network and game latency.

It would track fine whenever the player walks or moves in a straight direction. Both overlays would be right on top of each other. But whenever that player changes direction, the lag compensated version continues for a short moment walking in the direction it was going in before correcting to the new movement and position.

nick4567
Posts: 118
Joined: 10 Mar 2019, 19:55

Re: internet latency

Post by nick4567 » 03 Jun 2019, 15:43

i was thinking about solutions more along the lines of the isp side of things like things relating to the infrastructure like how could they change the infrastructure so that packets show up on time

open
Posts: 223
Joined: 02 Jul 2017, 20:46

Re: internet latency

Post by open » 03 Jun 2019, 20:18

I'm sure much could be done in regards to that. Getting a high quality isp can go a long way. But it's not really an option some places. I could chose xfinity or att in my area and they both suck. Hotwire is way better with 1ms pings vs the other two with 40ms+. But you have to live in certain apartments / neighborhoods.

I've heard people say that 5g will provide much better latency and I certainly hope so. Not having the same infrastructure constraints would allow for more options / competition among isps.

kokkatc
Posts: 108
Joined: 23 Mar 2017, 13:49

Re: internet latency

Post by kokkatc » 04 Jun 2019, 13:08

Are you trying to look for ways to improve network latency or just curious how an ISP can improve its infrastructure to improve latency? Are you looking for solutions to apply to your own system or just looking for general INFO?

nick4567
Posts: 118
Joined: 10 Mar 2019, 19:55

Re: internet latency

Post by nick4567 » 04 Jun 2019, 18:21

more of like a general because theres nothing i can do on my end about this issue but this happens regardless of my ping like my ping doesnt really fluctuate that much like 2-3 ms fluctuation and i generally get good ping but for some reason certain times of the day it feels like 400 ping almost and other times it feels better but still not that good and the issue is caused by network congestion im pretty sure of that because i went to my friends house and it felt like a different game almost i had much better hit reg with around the same ping as my house

open
Posts: 223
Joined: 02 Jul 2017, 20:46

Re: internet latency

Post by open » 04 Jun 2019, 18:49

there is also packet loss. essentially leading to spikes in latency. use a command promt and run

ping google.com -n 6000

hit ctrl+c when you are done watching it.

you may get consistent pings most of the time but still randomly get more latency or dropped packets.

nick4567
Posts: 118
Joined: 10 Mar 2019, 19:55

Re: internet latency

Post by nick4567 » 04 Jun 2019, 23:51

12-24 avg 16 no packet loss

Locked