HTML and CSS Reference
In-Depth Information
Figure 12-2. Client-side prediction and correction; note that care should be taken when writing the graphics engine to
smoothly correct for these transitions (car image courtesy of Wikimedia)
When using client-side prediction with correction, clients can make new assumptions about when an action
should be processed. Without client-side prediction, clients must delay their inputs, basing them on the time it is
expected the input will take to reach all other clients. With client-side prediction, clients can reduce input delay to
an arbitrary number. As client delay decreases, the number of fast-forwards increases, and the game will feel more
responsive, but it will also contain more stuttering. As the delay increases, the number of fast-forwards decreases,
but the input latency will increase. The important point to note here is that adding client-side prediction removes
the latency constraint on the system and gives the developer more freedom. Adding client-side prediction also
keeps the entire game from halting when a particular user experiences packet loss. Note how in RTS games, such as
the first Starcraft , the entire game must slow down when a single player's connection quality decreases (i.e., when,
during play, a box pops up with the heading “Waiting for Players”). This is because many RTSs do not have client-side
prediction. The reason they do not is that their game state is so large and that reversing actions is difficult.
Search WWH ::

Custom Search