Today there was another very nice article at the renowned German publisher
Heise about compensating the lag in online games by means of the "client
prediction" technique:
Verzögerungen in Online-Spielen durch Client-Side Prediction kompensieren
(text is in German)
The author Christian Oeing explains the basics of online games whose simulated
world is managed by a central, authoritative game server that clients can
connect to. It is very well described how network latency affects basic
implementations of such client-server setups, and how this causes the player to
perceive the game as sluggish or lagged. As the key matter of the article,
Christian explains how the "client prediction" can be used to compensate for
the network lag. As "client prediction" can, quasi as a side effect, cause the
client's idea of the world state and that of the server to disagree, the author
also describes the techniques that can be use to overcome such divergencies:
"reconciliation" (or "reprediction", in Cafu lingo) and interpolation.
What makes the article special and my definitive recommendation (for those
among you who speak German), is that all this is written in a very readable
manner that is easy to follow and understand – and the huge coincidence that
everything that he describes is also implemented in the Cafu Engine since
several years. (To be precise, Cafu implements the "client prediction" and the
very important "reprediction" features, but deals with interpolation only in a
slightly different manner than described in the article.) Thus, especially for
those who want to familiarize themselves with the Cafu networking code but find
the comments and internal documentation too terse, the article is a must
read.
If you don't speak German, the article also provides links to English
texts:
In the meanwhile, we're
still very
busy with finishing the details of our newly introduced Component
Systems.
The basic work is all long done, but I would still like to fix a few more loose
ties in the Map Editor before this very fundamental project can be declared
done and ready for public consumption.