Latency Compensation Techniques The delay (and variance in
84 Networking and Online Games: Understanding and Engineering Multiplayer Internet Games (b) It will be quite some time before broadband is globally adopted by all online game players. (c) There is an increasing number of mobile, wide-area wireless environments that cannot benefit from the fixed infrastructure of broadband to the home. (d) Despite technology improvements, a certain amount of network delay will always remain because of the speed of light in fibre. For example, coast-to-coast delays across the United States of America cannot be less than about 25 milliseconds, not counting any additional delays from buffering. Intercontinental times will be even higher. Most games today basically run on a client server architecture with a single, authoritative server that handles the game logic. The clients collect input from the user and send it to the server. The server computes game state, sending the revised game state information back to the client. The client then renders the new game state to the player, and the process repeats. In some cases, the server can also act like a client, allowing a player to use the same machine as the server. In this case, the player offers to host a game. That player s computer then acts like a server for all players, as well as a client for the current player. This is still fundamentally a client server architecture, even though it may look like client client (or peer-to-peer) on the surface, in that all machines are being used as game clients. To illustrate the effects of latency on this basic architecture, consider the client to be where the user input is taking place. In the basic client server model, the client sends a message to the server when user input is received. The server processes (and validates) the input and sends the results back to the waiting client to render on the local display. Thus, the players actions are lagged by the round-trip latency between client and server. When the client acts in this manner, it is often called a Dumb client since it only acts on commands from the server, and is depicted in Figure 6.1. Time User input Render input Process and validate input Message: user input Message: ok user input Figure 6.1 Basic client-server with dumb client. Client only renders output of user input when it receives input ok from server
Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Inexpensive Web Hosting services