Patrefans
vercidium from patreon
vercidium patreon

Lag Compensation and Packet Delay Detection

🕑 Added 2024-11-08 11:11:24 +0000 UTC
Lag Compensation and Packet Delay Detection

Comments

Vercidium

Ahh I see, thank you I'll check out this video

Ramón

I'm referring to the variance in clients input latency: if several inputs are delayed (relative to the "average latency"), arrive suddenly at the same time and are processed immediately, they will appear to other players as if that player is teleporting. Overwatch has a small input buffer to hide it: https://youtu.be/W3aieHjyNvw (min. 26 onwards) and depending on the network conditions they resize it. Maybe it's not that important, and rarely happens so it makes sense removing it to reduce other players' "visual latency". Thanks for the answers.

Vercidium

Yes that’s right, no input buffer. What do you mean by client jitter? Yeah to keep bandwidth low the server broadcasts player/entity positions 60 times per second. For data that arrives at the server - e.g. a player’s jump packet - it is broadcast to all other players as soon as it arrives

Connor

Articles just as captivating as your videos. I particularly thought the "time travel" section was super fascinating. Really opens my eyes as to how much us actually going on behind the scenes to make a multilayer game work

Ramón

Wow, your engine is very well optimized because I can't imagine my server running at that tick rate. It makes sense, although, when you say you process packets as soon as they arrive, does it mean you don't have an input buffer to hide client's jitter? Also, I suppose you don't send server updates each 1/300 ms, but I'll wait for part 2 to see what you did. Thanks again, very useful information.

Vercidium

Yes I've never used a fixed tick rate. The server for Sector's Edge runs at ~300 FPS so that packets are processed as soon as they arrive. A fixed tick rate of 60Hz may add up to 16ms of extra latency, as the server would only handle incoming packets every 16ms

Ramón

Thank you, the tutorial is excellent. Just one question: when you say "But your game and the server will likely run at different frame rates, and the results of physics simulations will be slightly different." does that mean that you didn't adopt a fixed tick rate for both server and client? If so, what advantages does it have? because most tutorials and modern FPSeses recommend a 60Hz tick rate.


More Creators