Rev0verDrive Member would be the tracert and ping testable IP. How latency is calculated ..... The server timestamps its outbound packets to you. UDP Game Data Packets. You receive that packet. The client gets the current time timestamp and subtracts the packet creation timestamp value. This returns the base DELTA TIME.... One way. This value is multiplied by 2 to calculate a rough Round Trip Time. There's only one latency to show considering that 99.999999% of the time both inbound and outbound UDP game data packets will travel the exact same route to and from the client/server and vice versa. Lag compensation doesn't calculate an RTT. It just looks at the inputs timestamp for each individual input action. It uses that value as to how long ago you pressed "W" etc. An input packet (player movement) is basically an array. header (acks, bitfield, timestamp, id etc)... payload = array( 'input time' => 'key pressed', 'input time' => 'key pressed', 'input time' => 'key pressed', 'input time' => 'key pressed' ); Lag comp in itself is simply a way for the server and other clients to properly render what animation state/position you should be in based on the current game time and packet instructions. That's absolutely it. The server is the authority. All data is handed to it and then passed on to other players. You input a jump command. It's played out in real time for you (client-side prediction). At tick that command is sent to the server. Server processes it and updates its simulation of where you are. At the next tick it sends that new information about you to any player nearby that needs it (Relevance/Priority). They receive it. Using the input time of that command and the time of receival the client can interpolate where you should be.  A jump animation is actually a sequence of mesh movement over time. At any given moment you can determine (with low margins of error) what part of an animation a mesh is in by subtracting the input time from the receive time. This returns the delta.  e.g. say the jump animation has a duration of 5 seconds. You input the command and it takes 2 seconds for the other player to receive it. His client will show you at the 2 second point in the jump animation.  This is all that Lag compensation is. "Where should X be based on receive time - command input time?"


Last Active
Member, Battlefield 3, Battlefield 4, Battlefield, Battlefield 1, CTE
Hide my latest activity
Restrict other users to write in my profile feed

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!