The meaning of lag
In online gaming, lag is a noticeable delay between the action of players and the reaction of the server supporting the game. Ping refers to the network latency between a player's client and the game server as measured with the ping utility or equivalent. Ping is reported quantitatively as an average time in milliseconds (ms). The lower one's ping is, the lower the latency is and the less lag the player will experience. High ping and low ping are commonly used terms in online gaming, where high ping refers to a ping that causes a severe amount of lag; while any level of ping may cause lag, severe lag is usually caused by a ping of over 100 ms. This usage is a gaming cultural colloquialism and is not commonly found or used in professional computer networking circles. In games where timing is key, such as first-person shooter and real-time strategy games, a low ping is always desirable, as a low ping means smoother gameplay by allowing faster updates of game data between the players' clients and game server.
High latency can cause lag. Game servers may disconnect a client if the latency is too high and may pose a detriment to other players' gameplay. Similarly, client software will often mandate disconnection if the latency is too high. High ping may also cause servers to crash due to instability.
In some first-person shooter games, a high ping may cause the player to unintentionally gain unfair advantages, such as disappearing from one location and instantaneously reappearing in another, simulating the effect of teleportation, thus making it hard for other players to judge their character's position and subsequently making the player much more difficult to target. To counter this, many game servers automatically kick players with a ping higher than average. Conversely, a high ping can make it very difficult for the player to play the game due to negative effects occurring, making it difficult for the player to track other players and even move their character.
Rather than using the traditional ICMP echo request and reply network packets to determine ping times, video game programmers often build their own latency detection into existing game packets (usually based on the UDP protocol) instead.
Some factors that might 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. 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.
Causes:
A simplified game architecture: 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, they can be summarized as insufficient hardware in either the client or the server, or a poor connection between the client and server.
Hardware related issues cause lag due to the fundamental structure of the game architecture. Generally, games consist of a looped sequence of states, or "frames". During each frame, the game accepts user input and performs necessary calculations (AI, graphics etc.). When all processing is finished, the game will update the game state and produce an output, such as a new image on the screen and/or a packet to be sent to the server. The frequency at which frames are generated is often referred to as the frame rate. As the central game state is located on the server, the updated information must be sent from the client to the server in order to take effect. In addition, the client must receive the necessary information from the server in order to fully update the state. Generating packets to send to the server and processing the received packets can only be done as often as the client is able to update its local state. Although packets could theoretically be generated and sent faster than this, it would only result in sending redundant data if the game state cannot be updated between each packet. A low frame rate would therefore make the game less responsive to updates and may force it to skip outdated data.
Conversely, the same holds true for the server. The frame rate (or tick rate) of the server determines how often it can process data from clients and send updates. This type of problem is difficult to predict and compensate for. Apart from enforcing minimum hardware requirements and attempting to optimize the game for better performance, there are no feasible ways to deal with it.
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. In addition, insufficient bandwidth and congestion, even if not severe enough to cause losses, may cause additional delays regardless of distance. As with the hardware issues, packets that arrive slowly or not at all will make both the client and server unable to update the game state in a timely manner.
Online game systems utilizing a wireless network may be subject to significant lag, depending on the architecture of the wireless network and local electromagnetic interference impacting that network. Electromagnetic interference (e.g. from a microwave oven) can cause transmitted packets to be lost, requiring a retransmission which incurs latency. Although radio propagation through air is faster than light through optical fiber, wireless systems are often shared among many users and may suffer from latency incurred due to network congestion, or due to network protocols that introduce latency.
Effects: The noticeable effects of lag vary not only depending on the exact cause, but also on any and all techniques for lag compensation that the game may implement (described below). As all clients experience some delay, implementing these methods to minimize the effect on players is important for smooth gameplay. Lag causes numerous problems for issues such as accurate rendering of the game state and hit detection. In many games, lag is often frowned upon because it disrupts normal gameplay. The severity of lag depends on the type of game and its inherent tolerance for lag. Some games with a slower pace can tolerate significant delays without any need to compensate at all, whereas others with a faster pace are considerably more sensitive and requires extensive use of compensation to be playable (such as the first-person shooter genre). Due to the various problems lag can cause, players that have an insufficiently fast Internet connection are sometimes not permitted, or discouraged from playing with other players or servers that have a distant server host or have high latency to one another. Extreme cases of lag may result in extensive desynchronization of the game state.
Lag due to an insufficient update rate between client and server can cause some problems, but these are generally limited to the client itself. Other players may notice jerky movement and similar problems with the player associated with the affected client, but the real problem lies with the client itself. If the client cannot update the game state at a quick enough pace, the player may be shown outdated renditions of the game, which in turn cause various problems with hit- and collision detection. If the low update rate is caused by a low frame rate (as opposed to a setting on the client, as some games allow), these problems are usually overshadowed by numerous problems related to the client-side processing itself. Both the display and controls will be sluggish and unresponsive. While this may increase the perceived lag, it is important to note that it is of a different kind than network-related delays. In comparison, the same problem on the server may cause significant problems for all clients involved. If the server is unable or unwilling to accept packets from clients fast enough and process these in a timely manner, client actions may never be registered. When the server then sends out updates to the clients, they may experience freezing (unresponsive game) and/or rollbacks, depending on what types of lag compensation, if any, the game uses.
Lag due to network delay is in contrast often less of a problem. Though more common, the actual effects are generally smaller, and it is possible to compensate for these types of delays. Without any form of lag compensation, the clients will notice that the game responds only a short time after an action is performed. This is especially problematic in first-person shooters, where enemies are likely to move as a player attempts to shoot them and the margin for errors is often small.
High latency can cause lag. Game servers may disconnect a client if the latency is too high and may pose a detriment to other players' gameplay. Similarly, client software will often mandate disconnection if the latency is too high. High ping may also cause servers to crash due to instability.
In some first-person shooter games, a high ping may cause the player to unintentionally gain unfair advantages, such as disappearing from one location and instantaneously reappearing in another, simulating the effect of teleportation, thus making it hard for other players to judge their character's position and subsequently making the player much more difficult to target. To counter this, many game servers automatically kick players with a ping higher than average. Conversely, a high ping can make it very difficult for the player to play the game due to negative effects occurring, making it difficult for the player to track other players and even move their character.
Rather than using the traditional ICMP echo request and reply network packets to determine ping times, video game programmers often build their own latency detection into existing game packets (usually based on the UDP protocol) instead.
Some factors that might 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. 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.
Causes:
A simplified game architecture: 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, they can be summarized as insufficient hardware in either the client or the server, or a poor connection between the client and server.
Hardware related issues cause lag due to the fundamental structure of the game architecture. Generally, games consist of a looped sequence of states, or "frames". During each frame, the game accepts user input and performs necessary calculations (AI, graphics etc.). When all processing is finished, the game will update the game state and produce an output, such as a new image on the screen and/or a packet to be sent to the server. The frequency at which frames are generated is often referred to as the frame rate. As the central game state is located on the server, the updated information must be sent from the client to the server in order to take effect. In addition, the client must receive the necessary information from the server in order to fully update the state. Generating packets to send to the server and processing the received packets can only be done as often as the client is able to update its local state. Although packets could theoretically be generated and sent faster than this, it would only result in sending redundant data if the game state cannot be updated between each packet. A low frame rate would therefore make the game less responsive to updates and may force it to skip outdated data.
Conversely, the same holds true for the server. The frame rate (or tick rate) of the server determines how often it can process data from clients and send updates. This type of problem is difficult to predict and compensate for. Apart from enforcing minimum hardware requirements and attempting to optimize the game for better performance, there are no feasible ways to deal with it.
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. In addition, insufficient bandwidth and congestion, even if not severe enough to cause losses, may cause additional delays regardless of distance. As with the hardware issues, packets that arrive slowly or not at all will make both the client and server unable to update the game state in a timely manner.
Online game systems utilizing a wireless network may be subject to significant lag, depending on the architecture of the wireless network and local electromagnetic interference impacting that network. Electromagnetic interference (e.g. from a microwave oven) can cause transmitted packets to be lost, requiring a retransmission which incurs latency. Although radio propagation through air is faster than light through optical fiber, wireless systems are often shared among many users and may suffer from latency incurred due to network congestion, or due to network protocols that introduce latency.
Effects: The noticeable effects of lag vary not only depending on the exact cause, but also on any and all techniques for lag compensation that the game may implement (described below). As all clients experience some delay, implementing these methods to minimize the effect on players is important for smooth gameplay. Lag causes numerous problems for issues such as accurate rendering of the game state and hit detection. In many games, lag is often frowned upon because it disrupts normal gameplay. The severity of lag depends on the type of game and its inherent tolerance for lag. Some games with a slower pace can tolerate significant delays without any need to compensate at all, whereas others with a faster pace are considerably more sensitive and requires extensive use of compensation to be playable (such as the first-person shooter genre). Due to the various problems lag can cause, players that have an insufficiently fast Internet connection are sometimes not permitted, or discouraged from playing with other players or servers that have a distant server host or have high latency to one another. Extreme cases of lag may result in extensive desynchronization of the game state.
Lag due to an insufficient update rate between client and server can cause some problems, but these are generally limited to the client itself. Other players may notice jerky movement and similar problems with the player associated with the affected client, but the real problem lies with the client itself. If the client cannot update the game state at a quick enough pace, the player may be shown outdated renditions of the game, which in turn cause various problems with hit- and collision detection. If the low update rate is caused by a low frame rate (as opposed to a setting on the client, as some games allow), these problems are usually overshadowed by numerous problems related to the client-side processing itself. Both the display and controls will be sluggish and unresponsive. While this may increase the perceived lag, it is important to note that it is of a different kind than network-related delays. In comparison, the same problem on the server may cause significant problems for all clients involved. If the server is unable or unwilling to accept packets from clients fast enough and process these in a timely manner, client actions may never be registered. When the server then sends out updates to the clients, they may experience freezing (unresponsive game) and/or rollbacks, depending on what types of lag compensation, if any, the game uses.
Lag due to network delay is in contrast often less of a problem. Though more common, the actual effects are generally smaller, and it is possible to compensate for these types of delays. Without any form of lag compensation, the clients will notice that the game responds only a short time after an action is performed. This is especially problematic in first-person shooters, where enemies are likely to move as a player attempts to shoot them and the margin for errors is often small.
Tips'n'tricks
|
"outroduction" aka conclusion
Now that you know about lag, the next time it happens you can be ready for it. Watch out for chunky and slow gameplay. And, don't be scared to try and fix it yourself.
Sourses used
Wikipedia, Wikihow, and Foxnews