n amazing look into Lag & its causes in a real game (we all love) is a few clicks away. The Video of Team Fortress 2 (a Valve Steam Source game) and the real game developer conversation about TF2 and Counterstrike Source are both incredibly revealing, shocking, and prove true what we at ELN have been saying for a long long time. Lag is caused by the internet, the client, and the server... and in many cases, Lag is even introduced and expected: e.g. the things game developers do to try to "Hide Network Lag" from the weak (slow net connections), actually make those of the strong (like you and me with decent to good net connections) experience MORE Client Lag. Not good my friends. I'll take my game without Lag please... read on for the truth, and straight to the point of the story.
About 6 months ago, the Valve team released to the public its "Source" engine. This release was not an 'open-source' movement, but rather an attempt to get people to use the engine, but with a limited license whereby Valve got distribution rights & other rights. Recently, careful study and use of the released Source engine has revealed a LOT about Lag that people involved in this movement (the end of Lag) should carefully consider.
There is a ton in the articles themselves, so please read if you have the time/stomach.. but I wanted to give everyone the 2 key ideas I got:
1.) "the server moves all other players back to where they were at the command execution time" via the function
Command Execution Time = Current Server Time - Packet Round-Trip-Time - Client View InterpolationWhat this means in short is... where you aimed is "estimated" by the server to hit or not (that's a hit box, see the cool video for examples). the higher your latency, the further back in time your hit box goes... (think mouse-trails)
2.) Client Prediction is where the game lets the user think something happened... even if the server hasn't
agreed to it yet... but Lag creeps in when errors occur and the Server
doesn't agree and suddenly: "Prediction error correction can be quite noticeable and may cause the client's view to jump erratically."
There are a ton of other great concepts to explore in the article.. too much for one blog post... up next: what about the products & technologys that I'm working on in context to these 2 ideas?