While a
single-player game maintains the main game state on the local machine, an
online game requires it to be maintained on a central server in order to avoid inconsistencies between individual clients. As such, the client has no direct control over the central game state and may only send change requests to the server, and can only update the local game state by receiving updates from the server. This need to communicate causes a delay between the clients and the server, and is the fundamental cause behind lag. While there may be numerous underlying reasons for why a player experiences lag, most common reasons are poor connection between the client and server, or insufficient processing in either the client or the server.
Connection Perhaps the most common type of lag is caused by
network performance problems.
Losses,
corruption or
jitter (an outdated packet is in effect a loss) may all cause problems, but these problems are relatively rare in a network with sufficient
bandwidth and no or little
congestion. Instead, the latency involved in transmitting data between clients and server plays a significant role. Latency varies depending on a number of factors, such as the physical distance between the end-systems, as a longer distance means additional transmission length and
routing required and therefore higher latency. Routing over the
Internet may be extremely indirect, resulting in far more transmission length (and consequent latency) than a direct route, although the cloud gaming service
OnLive has developed a solution to this issue by establishing
peering relationships with multiple
Tier 1 network Internet Service Providers and choosing an optimal route between server and user. This usage is a gaming cultural colloquialism and is not commonly found or used in professional computer networking circles. Some factors that might particularly affect ping include:
communication protocol used, Internet
throughput (connection speed), the quality of a user's
Internet service provider and the configuration of
firewalls. Ping is also affected by geographical location. For instance, if someone is in India, playing on a server located in the United States, the distance between the two is greater than it would be for players located within the US, and therefore it takes longer for data to be transmitted, resulting at 20,000 km (
halfway around the Earth) in a ping of 133 ms. However, the amount of packet-switching and network hardware in between the two computers is often more significant. For instance,
wireless network interface cards must modulate digital signals into
radio signals, which is often more costly than the time it takes an electrical signal to traverse a typical span of cable. As such, lower ping can result in faster Internet download and upload rates.
Interface Input-lag Input-lag or
input latency is the lag produced by the
input device, such as a mouse, keyboard or other controller, and its connection. Wireless devices are particularly affected by this kind of lag. Some people claim to notice extra lag when using a wireless controller, while other people claim that the 4–8 milliseconds of lag is negligible. The
refresh rate is a type or part of input-lag that is the rate of a display to produce distinct picture, measured in
Hz (e.g. 60, 240 or 360, that is 16.7, 4.2 or 2.8 ms respectively).
Display lag This is the lag caused by the television or monitor (also called
output lag). In addition to the latency imposed by the screen's
pixel response time, any image processing (such as
upscaling,
motion smoothing, or
edge smoothing) takes time and therefore adds more input lag. An input lag below 30
ms is generally considered unnoticeable in a
television. Once the frame has been processed, the final step is the updating the
pixels to display the correct color for the new frame. The time this takes is called the
pixel response time. == Effects ==