One prominent use of interpolation is in the propagation of world state in networked games. While interpolation is used to a degree in networked games with small numbers of players, it is of less importance here than in the case of MMORPGs, where issues of scalability prevent broadcasting every change in world state to all clients as the number of connected clients grows rapidly. Games that depend on fast “twitch” / reflex actions, such as first-person shooters, must also take network latency and interpolation into account in the design of the multiplayer aspects of their game architectures. Two major methods of dealing with the large amount of world state that must be synchronized between all players in a game, as well as with the possibility of packet loss: delta compression, and extrapolation with interpolated corrections.
Delta compression requires that, at some point, the client and server both have a fully synchronized copy of the world state, which is set up and broadcast to all clients at the beginning of the game. From this point forward, the server keeps track of the last state that each client acknowledges having received, and sends changes, or “deltas,” from this state to each client. This has the nifty property that packet loss is implicitly handled, because dropped packets are never acknowledged by the client, so the deltas that the server sends to the client are from the last state that the client actually received. This method was notably used by Quake 3 to support relatively scalable (for the time), reliable, fast-action multiplayer games across potentially unreliable network connections. As the article on Quake 3’s networking model notes, however, delta compression can be relatively bandwidth-intensive, as the server always sends state changes regardless of whether the client received them or not. Furthermore, the server may potentially need to buffer large amounts of data to handle many clients on highly unreliable network connections, storing all the states from the last state that the client acknowledged up to the current state the server is broadcasting.
Extrapolation with interpolated corrections, however, offers a potential solution to the bandwidth requirements of delta compression. Essentially, after synchronizing the initial state with all clients, the server broadcasts the minimum amount of object state required for the clients to interpolate the changes in values the state is actually undergoing. For example, if a character was moving from point A to point B, the server might broadcast the destination point and the time when the movement was started. Since the clients all have a copy of the world state, they can perform the same pathfinding or collision detection as the client that actually moved the character, and they can approximate how the character will move. Every once and a while, the server broadcasts corrections to the world state, which essentially set object values to absolute, known quantities, thereby resynchronizing the world state between clients. (Essentially, this is delta compression, but far less frequent, thereby reducing bandwidth demands.) In our character motion example, the server might broadcast that the character has now arrived at point B, and all clients must move the character object there, regardless of where in the extrapolation they are. These corrections are then used to interpolate between where each client thinks the character object is, and where the server declares the object actually is, so that the players don’t see the object “snap” to its correct location, but rather move there smoothly.
References
The Quake 3 Networking Model:
http://web.archive.org/web/20060322211154/http://www.bookofhook.com/Article/GameDevelopment/TheQuake3NetworkingModel.html
Torque Network Library Design Fundamentals: http://opentnl.sourceforge.net/doxydocs/fundamentals.html






Leave a Comment
You must be logged in to post a comment.
* You can follow any responses to this entry through the RSS 2.0 feed.