Friday, June 5, 2009

Latency: Life in the Real World

Latency is a synonym for delay. It is an expression of how much time it takes a packet of data to get from one designated point to another. There are several different causes of latency, including propagation (travel time at the speed of light), transmission (the medium of transport for the packet), routers, and other storage delays.

In terms of casting and spell queuing, there is zero latency from one cast to the next if the queue time (~300 ms) is greater than your individual latency. However, you can only queue a spell after one second of the GCD has passed. This presents a rather significant problem when your casting time begins to reach one second. The "Not ready yet" error message is sent client side (your computer) so you can't even begin to send a packet saying "Cast Wrath" until that one second GCD has passed.

Once we have cleared the one second GCD, we can send a packet out to cast our next Wrath (or DoT, or 4T8 proc, or any GCD based ability). At this point the packet leaves our computer and we have a delay of our latency before the game reacts to our command. This effectively increases the cast time of our one second Wrath by our latency.

On top of this, we have reaction time after the one second GCD. If you're a button spammer this might be a low number. If you're relaxed and waiting for the cast to finish before even pressing the button, this might be a high number. Check out Reaction Time - The Game for a look at how your reaction time is. My best was 0.201! Whew, fun times. . .

I have put out several different results now showing that a Solar rotation can theoretically put out more DPS than a Lunar rotation. I hope that if you read those, you also read my caveats that the Solar rotation would suffer due to spell queuing where as the Lunar rotation would be much less affected. I plan on adding in some latency and seeing what happens to the Solar rotation's DPS.

I will be using my standard theoretical druid with 3000 spellpower, 40% crit, and 389 haste rating.
Note: I am still ignoring reaction time since this is hard to gauge. DPS loss would only increase due to reaction time.

The Graph


So I found Google's chart API. Its only so so, because it's not very user friendly but the graphs sure do look nice. Here;s the graphical representation of the effects of latency on the average damage of your wrath spell. I did not do a thorough job of calculating my cast time as I only looked at average cast time and then skewed it with the addition of latency. I should have calculated cast time individually for both NG and non-NG casts. But it's close enough for government work, right!?
Google Chart

As we can see, there is an exponential decay happening as my latency increased. This indicates that we see a dramatic decrease in DPCT that slowly levels off as our latency gets higher. Notice the little hiccup at the beginning of the graph. At that point I had hit a latency plus 1 second GCD that was less than the actual average cast time. Any latency under this value would give the exact same DPCT.

For the math junkies, here were my exponential regressions and their corresponding R2 values.
2T8 Eclipse DPCT: y = 6445.1e-0.0007x R2 = 0.9937
Eclipse DPCT: y = 5778.4e-0.0007x R2 = 0.9937
Normal DPCT: y = 4444.9e-0.0007x R2 = 0.9937

Implications on Previous Results


Since these regressions all gave the same exponent, we can assume that regardless of the initial damage dealt, the reduction is a flat percentage base reduction. Thus, I am able to apply a general percentage reduction to all of my Wrath casting results. I personally have an average ping of 70 ms. This gives me 2.14% reduction in damage on the average wrath cast. A 100 ms ping would give me a 4.81% reduction in damage.

EDIT: I have uploaded a user friendly version of my calculations for the damage decrease that one might see given their particular stats and their latency. Just open up your armory and copy the relevant stats over, input your average latency, and you should be able to see what kind of damage reduction you are looking at. This could help you determine whether to use a Lunar or Solar rotation given your personal latency. Available for download here.

No comments: