Lag Compensation

From CLUMP
Jump to navigationJump to search

Lag, or "weather" as it's called in character is when your ping rate rises above about 250 milliseconds (.25 seconds). Ping is the time it takes for a packet of data (in CL packets are usually under 1000 bits) to reach the clan lord server (or any server) from your computer. The longer the latency (or delay), then the less responsive your character becomes. Because of this delay between when you act and when the server receives the command, you over shoot your targets and sometimes end up a couple of exile lengths from where you intended to go. A lot of people blame latency on DT and the CL server, but, as many a trace route has shown, it is almost never their fault. It's usually closer to home or on their ISPs side of things, well beyond their control. If everyone in the world experiences lag, then you know it's the DT server. If it's just you, or a few people in your group, you know it was a router between you and DT. The only time server lag is noticeable and caused by DT is right before an update on Wednesdays, when the World Gerbil GM loads new code and backup the game databases. Sometimes the GMs are kind enough to post a message about such weather problems, sometimes they're not. A good measure of how close the network problem is to the CL Server, without doing a trace route is if the entire clanning world feels a hiccup — it could be the server or the main pipe out of it.

If your latency is fairly static (if it's usually around .5 seconds and doesn't change very much due to your location) then you can compensate by thinking ahead of what you see and reacting earlier than you would. You know that it take .X seconds for a command to register, so go someplace and practice your timing by running in circle around a building, and then graduating to ferals and other quick prey once you've mastered that.

Other Causes of Lag

Processor Overloaded

Sometimes when you are running multiple programs or running many 3rd party extensions, your processor can't send your commands to the server right away. In that case quit some open applications to free up time on your CPU. If that doesn't work look for 3rd party additions to your system that act in real time first and disable those. If that still doesn't work, then you might want to consider upgrading your computer.

Network Overload

Like processor overload, if your computer or router (though less likely) is swamped doing other networking tasks such as file transfers while you clan, you can get several seconds of lag. I've experienced this problem first hand when someone downloads a large file off of my computer over TCP/IP (the protocol the internet runs on) while I clan. The good news is that once the file transfer is complete, the bug goes away.

To monitor network Input/Output and/or the system load in OS X you can try out menumeters. It's a great little program, and it's donation-ware.

Wireless Signal Too Weak

Sometimes, when you are far away from your wireless access point (WAP), or you have metal in between the antenna and the WAP, the signal is too weak to successfully transfer the data being sent. When this fails the data has to be resent, which delays the update of either the screen, your input, or both. Try moving closer to the WAP or move the WAP closer to where you usually clan.

Other sources of interefence, especially with older access points are cordless phones, microwaves, refrigerators, wireless mice and wireless keyboards. In that case replacement of the access point with an 802.11G type may be your best choice. If you have a mix of wireless access cards from different vendors or built in wireless, then stay away from 802.11N products until that standard is officially ratified sometime in late 2007.

--> 20070214: This advice is about to change btw, see this. The 802.11n standard has nearly been ratified. Although up to date reviews are hard to find, I have verified that the newer D-Link - Xtreme N Wireless-N Gigabit Router DIR-655 works with a new MacBook Intel Core Duo and integrated newer Windows PCs (e.g. circa 2006 with built-in 802.11G support, running XP SP2). The catch for using the Windows wireless wizard is that you have to monkey with the Network Location Awareness service - turn it off sometimes. Another version the DLink DIR-855 Dual Band Draft N Wireless Router is set to be released perhaps at the end of March. It will support "Simultaneous Dual Band (2.4 and 5.8GHz) Operation". In other words your slower older wireless devices cards won't slow down your new wireless devices. Also the DLinks have the best way to turbo pass your Clanlord packets through via the QoS/Game Fuel configuration section.

--> 20110317: 802.11N is the most current standard and most N routers I have used (D-link, Netgear, Linksys) all route traffic speedily. Once again QoS features in the router will make your connection as lag free as possible on your end.

Modem Too Cheap or Equipment Overloaded

If you're still on a modem, not all are made equal some cheap ones may route a packet much slower than others. Also if you're on a shared connection or going through a busy network lag could be caused by the overloading of network equipment before you even get out to the internet.

ISP is Terrible

Not all ISPs are created equal, some are on a back bone (A main through fare on the internet) while some are leasing their connection from others ISPs which are leasing their connection, etc. and they might be far away from a backbone. If it is your ISP, consider switching ISPs.

Firewall port not configured properly

If you have a hardware firewall (cable/DSL _router_ is one such device) then you need to configure it to allow ports 5000/UDP and 5010/UDP & TCP in to your network from the internet (to be safe limit it to the IP address of server.clanlord.com - currently 209.128.94.98). Otherwise those packets more than likely will NOT make it to your computer and this will usually prevent you from playing.

  • If you have a "QoS" option in your hardware firewall or cable/dsl router configuration then add ports 5000 and 5010 to the list of ports served by QoS (aka Gamer ports). Also upgrade your router's firmware to the latest if you drop frequently...

See also this:

Router about to fail

At least two people, myself included have had this happen to them. If you find your Clanlord client locking up at times, such that you have to leave/rejoin the game or worse, restart the Clanlord client, then take a look at your router. It may be ready to fail. Ours went into diagnostic mode and was unable to get an IP from our ISP. Nor were we able to ping it from the inside. This is happening more frequently. It also manages to crash the wireless access point attached to it occasionally.

If your router hasn't totally failed, to recover from this situation you will need to power off both the router and the cable/dsl modem AND disconnect all wired connections - except your DSL/Cable modem wire (e.g. WAN) to your router. Then power up your cable modem, wait for it to get to ready status. Then power up your router and wait until it is ready. Once that is done, then you can reconnect all your internal (LAN) the wired connections to the router. Then you can look at replacing your router.

Tom's hardware has one of the few scorecards on routers, albeit a little out of date. Router speed charts

I have also used the D-Link Wireless 108G Gaming Router. Although it is older (released 2005), it rocks for Clanlord. It has the same configuration options as the more expensive D-Link - Xtreme N Wireless-N Gigabit Router DIR-655, without the draft-N support of course.

Self Inflicted

Symptoms: You cannot move but everyone else can - this is called one-way lag. Jerky stalls with out of control speeding up of your characters movement. This type of lag is usually a client issue. The following are possible causes in their most likely order.

Look for these problems:

  1. Non Quicktime (e.g. not MP3s) in the clanlord/data/music folder.
  2. Running iTunes, Firefox with many extensions or other intensive program.
  3. VirusScan or Spyware scan in progress.
  4. Check for pauses in endless loops. Using more than 'pause 4' appears to cause a one or more second delay in accepting input.
  5. Check for multiple endless loops. Try to consolidate them into one loop.
  6. Unintentional endless loop. Try to code a break key into it.
  7. An endless loop with many actions (e.g. spams your text log or message area).
  8. On the PC, using @Next to scan through players list (reported via Noivad by Gorvin).


Solutions:

  1. Remove all non music/quicktime files from the clanlord/data/music folder. By design the Windows client will open any files in there and attempt to play them. You can also mitigate this by turning the Music off in the menu Options/Music (CTRL+M).
  2. Close iTunes, Firefox or your other intensive program. iTunes is known to be a memory hog and can cause stuttering if it is playing music and especially when playing videos/movies. Some versions of Firefox had memory leaks which causes the entire PC to slow down.
  3. Pause or stop your Virus/Spyware scan. Try scheduling it for times you normally don't clan.
  4. Try to remove extra pauses (if able to) in your scanning (endless) loops.
  5. See AlternateDefault for mother of all scanning loops, and how to move long scan checks into other macro files (e.g. Readtext.mac).
  6. See Macros_Contributed for examples of break keys and their incorporation.
  7. Use a counter vice a pause to execute actions every X frames. One the counter is greater than your desired pause, then execute the actions (don't forget to reset your counter) - see AlternateDefault DHAwakeAFK for the example.
  8. Replace @Next with command used in Noivad's version of ExilePicker located at <<need ref>>

How to check the problem

First in the Clan Lord client, check your packet loss by going to the Options menu and Choose Network Stats... If you are losing packets, it is most likely not processor overload. The problem could be anywhere on the connection between your computer and the Clan Lord Server.

Next, open up your terminal application and type ping server.clanlord.com and hit return. You'll see something like this:

computer:~ username% ping server.clanlord.com
PING server.clanlord.com (209.128.94.98): 56 data bytes 64 bytes from 209.128.94.98: icmp_seq=0 ttl=52 time=172.249 ms
64 bytes from 209.128.94.98: icmp_seq=1 ttl=52 time=152.167 ms
64 bytes from 209.128.94.98: icmp_seq=2 ttl=52 time=172.108 ms

hit <control-c> to stop the pinging of the server after a few seconds.

Please note you need to ping server.clanlord.com NOT www.clanlord.com or clanlord.com. The website is hosted on a different location than the game server. Also the billing and character server is on a different location as well, admin.clanlord.com.

Read the last number on each line and that's how many milliseconds it takes to reach the server and get an answer. If that number is over 250ms, the lag is somewhere in the connection.

To find out where the lag is on your connection and determine if there is anything you can do about it, use the trace route command. Type traceroute server.clanlord.com and hit return. You'll see something like this:

traceroute to server.clanlord.com (209.128.94.98), 64 hops max, 40 byte packets

1  69.sub-66-174-33.myvzw.com (66.174.33.69)  112.162 ms  133.627 ms  235.926 ms
2  113.sub-66-174-208.myvzw.com (66.174.208.113)  163.959 ms  126.316 ms  122.989 ms
3  ge-4-6.car1.losangeles1.level3.net (64.156.173.157)  111.922 ms  180.391 ms  166.875 ms
4  ae-32-56.ebr2.losangeles1.level3.net (4.68.102.190)  166.078 ms 123.618 ms *
5  ae-2.ebr1.sanjose1.level3.net (4.69.132.9)  146.774 ms  143.616 ms 132.885 ms
6  ae-11-53.car1.sanjose1.level3.net (4.68.123.79)  303.580 ms 25.715 ms  204.811 ms
7  bay-area-in.car1.sanjose1.level3.net (4.79.219.106)  171.956 ms  135.572 ms 134.009 ms
8  sr2sc1-ge0.bayarea.net (209.128.116.111)  150.950 ms  163.718 ms 129.058 ms
9  209-128-94-098.bayarea.net (209.128.94.98)  131.858 ms  159.748 ms  132.014 ms

The first number is your connection router's IP or modem IP. If this is long, your problem is on your end, and you can do something about it, try restarting the client, then the computer. if that doesn't work, you'll have to do a little research on the internet or contact a friend who knows how to troubleshoot your computer.

The Second number is your ISP's connection to you. If this number is high, the first thing you can do is reset the connection. Turn off your modem/router to get a fresh connection. If that doesn't work, contact your ISP's tech support to report the problem. A good ISP will investigate the problem or if they already know the problem, give you an answer, such as one of their servers or routers went down.

The Third number is probably your ISP's router to the gateway or another router. In the example above the ISP mindspring (which is part of Earthlink) routes to Earthlink's network until line 6, which is the gateway to the internet, or their ISP. You can report a problem, or ask why the connection is slow.

Note the fourth line where there is an asterisk on the last of the three pings. That indicates a failed ping. And could indicate one of the problems.

After that, you can't do much about it. If the problem is on the last line, then it's Delta Tao's host's problem, and you can report it to DT.

If the problem is constant, and it's your ISP, you might want to change ISPs, and/or contact your ISP and tell them you might leave because of the lag in their system.

If the problem is intermittent, then it's probably:

    • The internet itself that is either overloaded or a backbone or gateway's is down, and causing more traffic than normal on the other routes through the internet.
    • Or your Router is about to fail.

Other Network Problems

"After X minutes I get disconnected from CL"

The Linksys WRT series (version 4 and under) and possibly other routers have a firmware bug where UDP streams (what the Clan Lord client and server use to communicate with each other) are dropped after about 12 minutes (or less) of activity. The solution for Linksys WRT Series routers is to either upgrade or downgrade your firmware. I believe is was version 4.2.1 that had this problem. Sometimes that helps. If not, you can try replacing the router.