Shaman, Theorycraft, WoW

Introducing latency

The trouble with being back in academia is that one starts wanting to entitle posts along the lines of “towards an understanding of factors effecting spellcasting delays in World of Warcraft”.  (The contrary problem arises from being out too long, by which time you’re making equally inane titles like “WTS lag LOL!”)

Of course this is basically a big boring post so perhaps a title like that would be appropriate.

This is part one of the series on lag and how to cope with it.  This part answers some basic questions about the concept of “lag” as well as what causes it and why it’s important to be aware of it.  In part two we’ll see how it affects WoW specifically, and part three will deal with practical ways to manage it.

What is “lag”?

Lag is exactly what it sounds like – a delay between one thing and another thing.  Normally in computer-speak this refers to a delay between cause and effect caused by limitations rather than by design.  So whereas the programmer might want something to happen immediately that the user tells it to, that’s just impossible – there is always some measure of delay, however small.

Let’s look at four different types or sources of lag:

  • Network lag: this is the “normal” sort of lag that most people will talk (or whine) about.  It’s the delay between one computer sending out some information and the other computer reliably receiving it.  I put “reliably” in italics because this sort of lag is not just caused by the simple delay in time required for the information to travel, but is also caused by information not reaching the destination intact and having to be resent.  This is called “packet loss” and is often a more significant component of what we call “lag” than actual latency.  Lag on a network is usually measured as the time it takes for the first computer to send a packet of data and then receive a response from the second computer – the round trip time.
  • Processing lag: this is the delay between a computer being asked to calculate something and the calculation being performed.  Modern computers are so fast that humans won’t notice this delay for most gaming applications.  But start asking a computer to work out Pi to a billion decimal places and you’ll have to wait a while.
  • Graphical lag: graphics (and sounds) are how computers communicate with us humans.  We see something on our screen and react to what we see.  Thus the slower we are presented with information on our screens, the slower we will be able to react to it.
  • Biological lag: the final piece of the lag puzzle is our own human limitations.  We have to sit watching our screens and pressing keys.  There’s a delay between us seeing (or hearing) something happening and our fingers reacting to it.

Why is lag important?

Lag plays a big part in online games because we depend on knowing exactly where our avatars are and exactly what they’re doing at any given moment, and exactly where everything else in the virtual world is and exactly what it’s doing.  We then take all this information and respond to it.  For example if fighting a boss that spawns a big pit of fiery fire every now and again, you want to know some things very accurately:

  • Has fire spawned?
  • If so, am I standing in it?

If the answer to both is “yes” then you want to run the heck away.  At which point you need to answer some more questions:

  • Is the fire still there?
  • If so, am I still standing in it?

Meanwhile, your healers are asking similar questions like “has that idiot moved out of the fire yet?” and “can I be bothered healing him if he hasn’t?”  And while you’re standing there taking damage and the healer is considering healing you, how long you will survive is determined by how fast you move and how much healing you get.  And when you get that healing and whether you survive depends on whether the server thinks you are still standing in the fire or not and whether it has received the instruction from the healer to heal you or not.

Every single part of this fascinating story depends upon that complex interaction between “client” and “server” – your computer running WoW and the realm you’re playing on.  Here, let me illustrate it using professional clipart and graphics editing programs:

So it’s important to remember that every communication between the Clients has to go through the Server, and that every instruction you send from the Client has to physically reach the Server before it can be executed.

The delay

The internet is pretty fast these days – if you’re on the same continent as your server, chances are your latency will be in the region of 30-200 ms.  “ms” is short for “milliseconds”, or 1/1000ths of a second.  Let’s compare that to the other delays:

  • Graphical: You can work out potential graphical delay by your frames per second.  With 20 FPS you will be getting one frame (that is a graphical update) every 50ms or so (1000/20).  With 2 FPS you’re only getting one frame every 500ms or so.  With 60 FPS your frames are coming every 17ms.
  • Biological: Human reaction times and the factors which affect it are, as it turns out, an actual science which requires rigorous controls and testing procedures to accurately define.  Ignoring all that, most humans take between 150-250ms to react to a visual stimulus.  Things like tiredness, distraction, familiarity and anticipation all affect the time taken.
  • Processor: If your realm is running fine then you will never notice a processor* delay.  But if your realm is super-busy and a lot of people are in the same place at once, you may start to notice a looooooooong delay on everything you do.  This is not network lag, it’s the server struggling to deal with all the information it’s getting.  During peak times you may experience a “processing” delay of up to a few seconds (that is, thousands of milliseconds) for actions like mounting up, or a few minutes (that is, hundreds of thousands of milliseconds) for actions like sending mail or using the guild bank.

* I’m using “processor” in a conceptual rather than technical sense.

In part two we’ll take a look at how this translates into the World of Warcraft environment.

Next: 2: Lag and World of Warcraft >>



No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Get emailed about new posts!

Join 27 other followers

We write about

%d bloggers like this: