Analytical Perspectives in Game Design
Lag
Home ] Up ] Architecture ] Commands ] Communication ] [ Lag ] Object Model ] Persistence ] Scenarios ] Source Code ] Threads ]


 

The problems of Lag come primarily from the nature of the internet. This section describes the problems and some of the strategies undertaken to minimise these problems.

Sources of Lag

Lag is caused by the delay of transmission of data across the network and by delays in processing of the data.

Within the internet IP packets are routed around the network for up to tens of thousands of kilometres. Not only does this slow things down, but congestion on individual links or routers can mean that the through-put is low or that data is lost. Also these effect can change rapidly over a short period of time.

The server in a client server architecture has to process lots of data. As the number of users increase then the server will slow down. This is compounded by the fact that the server is probably a general purpose machine running other applications.

Also, all of the servers are multithreaded. This means that an operation received may or may not be completed before an operation received at a later time.

Effects of lag

The data transmission of data across the network is unpredictable in effective bit/s second and in time taken to transmit the data.

The speed of processing of data can be unpredictable from the point of view of the client.

Similar requests on a server sent at the same time may be performed in unexpected orders.

Methods to overcome lag

To overcome lag, I expect to do the following.

1. Load as much on to the client as possible. This really has the effect of forcing the client to be an application rather than an applet.

2. Keep the functions performed in the server to a minimum.

3. Minimise the data sent over the network.

4. Use optimistic record locking as the record locks will have to be transmitted over the network.

5. Prefetch data where possible.

6. Use client to client transmissions.

21/11/99

 


See also: [Role Playing Games] [Game Engine]
© 1998, 1999 Brian Yap. These pages are available under the GNU licence.