The basics - Ping - What to do when pings are high - Decrease the lag - Alternative online services - Strategies for lagged games
What is lag? In a network, there is always a certain time that a signal needs to reach its destination. First, we have to distinguish between throughput and signal delay.
ThroughputThis is often called "bandwidth", even though this term is incorrect. It means the raw amount of data that can be sent to the destination, regardless of the time that it needs to arrive and any errors that occur underway.
Signal delayThe signals traval fast (nearly at light speed), yet there is a measurable delay until it arrives, even on Local Area Networks (LANs). On the Internet, this delay is not only determined by the distance, but also by the number of routers that lie between the source and the destination (often more than 20). Each router introduces a small delay, since packets are queued there, making the signal delay far greater than the distance might indicate.
Quality of the connectionThis is another important parameter. It indicates the frequency of errors that happen when transferring a packet. This is usually not such a problem, because they are detected and false or lost packets are resent. However, in computer games, where packets are needed in real time (ideally), this introduces extra delays, so a connection with a reasonable quality is needed (packet losses greater than 5 % are inacceptable).
Other bottlenecksIf you play over the internet, the data packets have to travel many miles and through numerous bottlenecks, such as:
These factors set the technical limits; of course they also apply for the server and the person who receives the data. Unfortunately, only the throughput can be influenced by the user (i. e. by buying a better computer, in case the CPU cannot handle the load, or a faster modem). Of course a 14.4 modem will not yield the necessary performance; for most games, 28.8 Kbps is enough, though. Even for the latest 3D shooters, you will never need a throughput higher than 56 Kbps. The crucial limiting factor is the signal delay. Only a minor part of the lag is caused by your CPU (unless it is overloaded, in which case you will also have slow single player games and you should upgrade). Modern modems (28.8+ Kbps) have the required throughput. Thus, most of the lag is introduced by the signal delay and the routers, especially when the net traffic is high.
- CPU I/O capacity (both yours and the server's)
- satellites (they increase the distance compared to a direct connection, e. g. Europe - USA = 10,000 km over a transatlantic connection, but more than 80,000 km over a satellite).
There is nothing you can do against the rest, e. g. a bad connection (you may try to change the ISP or get ISDN phones, but these measures are expensive). Most people think they are immune to lag if they have a fast processor or a high throughput (e. g. 56 Kbps or higher). This is completely wrong. Since the CPU capacity and throughput is sufficient with newer computers and modems, the delay is pretty much the only factor that makes a difference. The delay mainly depends on where you are located, and there is pretty much nothing you can do about that.
Give me a ping - only one pingIn Kali or UNIX, you can ping players, and their current average "ping" is always shown when launching a game. The ping is the time that a small packet needs to go to the other computer and back to yours, also called the latency time. It is roughly twice the signal delay (since the packet has to go back to your computer, too).
Now your computer and the computer of the other player both lose around 25 ms for processing the in/output, and so do both ISPs. Together with the Kali server, this makes about 150 ms minimal lag. If the distance to the other computer is 7500 km, the signal itself already needs at least 200 ms to cover the distance [3*10**6 km/s /(2*7500 km)]. This would be the case if the computer and the modem were infinitely fast and the connection is perfect (fiber glass cable). So you see that even in the optimal case pings can already get pretty high. If the connection is bad due to high traffic, pings can increase dramatically (up to 2500 ms, sometimes even more).
What to do when pings are highWhen setting up a game and packet loss (see above) and pings are high, you should try it on a different server or forget about it and try it again later. Usually, playing a game during "prime time" (when all other people use the Internet, too), produces games with high lag, since the routers and servers are working to capacity.
In network games, a special network model is built in for internet play: if you give a command, the unit will wait half a second before carrying it out. You won't notice that, and the computer will have 500 ms time to transmit the signal to the server and get the acknowledgement. If the lag is below 500 ms, you usually won't notice that you are not playing over a LAN.
Alas, it is not always so! If the lag is higher, your men will stop and wait until all computers have caught up; this is certainly familiar to all players. The game will slow down. The hourglass will be shown instead of a cursor. You can give commands to your guys but they wouldn't obey :-)
A high lag makes a game unplayable, so you will want to make the best of the situation. The best thing against lag is prevention. However, usually you do not want to try again later, so there are some other things you can do:
Fight against the lag!In Age of Empires, the "laggers" (the players with a high ping) are marked with a turtle or some yellow or red dot. Yellow is still ok (ping between 300 ms and 1000 ms) unless it lasts for a while. A red dot means that the game will be very slow, unless the connection improves again.
If you see many names on the list with lag symbols, this indicates that you are the lagger! You have to decide then whether to quit or to go on.
If you do not want to have a player quit, pause the game for 30 seconds to give all computers a chance to catch up and to "synchronize the game", as it is usually called (in fact, the computers try to send all the lost packets again). However, this will not solve your problems (after a while, more packets will be lost again). If the lag is bad at the beginning, think about starting a new game. It is usually better than playing an awfully slow game. Later in the game, the decision is not that easy.
Before you are going to drop the lagger, give him a chance to leave the game himself. Tell him that his connection is too slow, and that he should leave the game. Of course you will have to reorganize the match then, usually turning it into an FFA game. It is still better to play a good game with fewer players than a slow, unplayable game.
While dropping a player is the most efficient measure against lag, there are also other things you can do, such as:
- Close all programs in the background: this should be obvious, but there are many people who are running ICQ in the background while playing. You need the full bandwidth for your game.
- Choose a host with a good connection and a fast CPU: the host has to handle a bit more than the other computers, so it should be the computer with the fastest connection and a reasonably fast processor.
- Turn the speed down: the game will still run slow but more smoothly than at a high speed setting. Many newbies turn the speed up when the lag is high, and I hate that! They make everything only worse, the men will jump around the screen and be totally uncontrollable.
- Set a maximum ping in the game setup (only available in Kali): while this feature is not 100 % reliable, it blocks at least all users with a very slow connection. Set the maximum to 800 or below (the more players there are in the game, the lower the ping should be). Note that the ping will rise will the others download the map. When setting a maximum ping, you might also block users that have other programs running in the background until the game starts. So you can alternatively set no maximum ping and then watch the ping values. Request the players with a high ping to leave, and if they don't, kick them :-)
- Not too many animals in the scenario: they produce a lot of overhead because their positions have to be updated; just take them out of the map, and the game will run smoother.
- A cable modem will not necessarily help: a cable modem has a much higher throughput, but it still runs through TCP/IP, so the latency time will be nearly the same as with a normal modem or ISDN. ATM, a new network/transport/data link protocol, will offer shorter latency times and an awesome (>150 Mbit/s) bandwidth - but that is the future. Just do not buy a cable modem with the expectation of faster games - you will get much faster downloads, though.
Alternative online servicesAnother solution is a gaming service that is built on a different technology than the Internet. You can get low lag games since the connection works like a phone call rather than a normal remote network connection. The downside is that you will have for it, and cannot play against people outside this network. The access points (you have to dial in like in an ISP) are usually concentrated in larger cities only. Such services are:
Strategies for lagged gamesWhen playing in games with high lag, you have to give up some strategies. Here are a few points that are affected in the game:
- Attack, no defense: due to the high time that units need to response, you will have no chance to respond to an attack. So make sure you are the attacking player. Keep the pressure up, and use the lag to your advantage!
- Don't guide your units individually in the battle: they won't listen to you anyway, and when they finally react, the situation has already changed and perhaps they should do something else then. Just let them fight :) and be aware that it will take a while for them to listen to your commands.
Lag is always annoying. You have to decide whether a game is worth to be played when the lag is high. Battles where the units are uncontrollable are very frustrating. Unfortunately, there is not much you can do against lag. Never forget that leaving a game due to high lag is nothing to be ashamed about. After all, the lag is not your fault :) - it is just a result of technical and physical limits. Of course you should ask the other players whether they want to go on without you before you leave.