Thread Tools Display Modes
06-26-17, 06:58 AM   #1
guema
A Deviate Faerie Dragon
Join Date: Aug 2016
Posts: 17
Exclamation The secret of lag tolerance Blizz don't want you know.

Yeah, this title is totally a click-bait as i have no ****ing idea if it is an actual secret.

I'm working on a casting bar system, and try to handle lag.

All i did from now is showing that it seems there is 2 distinct lag tolerance system :
- first (default 400 ms) is a spell queue. the system allows you to launch a second cast after the first if you press another skill in the last 400ms of a cast/cd/gcd, instead of having to wait that the server actually answers to your PC : "Cast finished, u can cast another one now"
- second : A mysterious, kind of ~100 ms dynamic tolerance (can vary between ~80 and ~120 on my pc). This one is different : if you stops a cast in the last ~100ms, it will be considered as succeeded even if you have cancelled it. It means it is a time you can use to move your character.

But do someone knows if this second value can be obtained by code ? I'm not able to find lot of informations on this, because the most info i seen are related to the spell queue.

Thank you very much in advance
  Reply With Quote
06-26-17, 09:21 AM   #2
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
There is no secret second lag tolerace it's called latency. It means the server can't pick up the interrupion event of the cast, since the time for the packet to reach the server (World latency) is bigger then the remaining time on the cast itself.

Most of the castbar addons can't handle this properly and will show the cast as interrupted. However you can build a castbar addon which also picks up these cast success events even after the client thinks the cast is already failed.

Last edited by Resike : 06-26-17 at 09:24 AM.
  Reply With Quote
06-26-17, 02:59 PM   #3
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,240
You can lower your latency with Leatrix Latency Fix. Please read the description, but the short version is that instead of waiting for two packets of data to arrive before answering that yes, your computer did get the first and second packets, your computer will answer on the first packet received.

This works with everything related to the internet, not just Warcraft or other games.
  Reply With Quote
07-06-17, 03:18 AM   #4
guema
A Deviate Faerie Dragon
Join Date: Aug 2016
Posts: 17
Originally Posted by Resike View Post
There is no secret second lag tolerace it's called latency. It means the server can't pick up the interrupion event of the cast, since the time for the packet to reach the server (World latency) is bigger then the remaining time on the cast itself.

Most of the castbar addons can't handle this properly and will show the cast as interrupted. However you can build a castbar addon which also picks up these cast success events even after the client thinks the cast is already failed.
Yeah, this is what i thank first.

What make me doubt is that this kind of behaviour happening on ~100ms cast remaining when my latency rarely exceed 20ms.

But maybe it is related to packets size granularity ? as a cast event could be much larger, and take much time to be transmited entierly than "stay alive" packets.

If, for exemple, a moving forward packet take 10ms to get the server, and a cast one take 100ms, i will always show a 100ms latency on casts even if the average is 20ms, distorted by the huge amount of smallest packets ?

as im really a not good network engineer, its just a speculation...
  Reply With Quote
07-06-17, 05:13 AM   #5
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Originally Posted by guema View Post
Yeah, this is what i thank first.

What make me doubt is that this kind of behaviour happening on ~100ms cast remaining when my latency rarely exceed 20ms.

But maybe it is related to packets size granularity ? as a cast event could be much larger, and take much time to be transmited entierly than "stay alive" packets.

If, for exemple, a moving forward packet take 10ms to get the server, and a cast one take 100ms, i will always show a 100ms latency on casts even if the average is 20ms, distorted by the huge amount of smallest packets ?

as im really a not good network engineer, its just a speculation...
First of all your latency only gets updated once every 30 seconds.

Seeing your character doing something on your screen or looking at your cast bar remaining time, or the time when the events getting triggered, and the time when the packet goes out and reaches the server are all a different thing.
And even when a packet reaches any router, between your PC and the server that packet need to be unpacked processed and send forward. Which takes more time for a full size packets then a ping request.

The game probably does not send a packet for every event either, a single packet is filled with multiple commands.

And there are a lot more things that can't be anticipated, how far away from the server, the weather conditions, the temperature, packet loss, the routing map and so on.

About the cast bar latency most castbar addons (Quartz) does not calculate that latency based on your world ping, but the time between your cast start and the event which picks up that cast, so it could be multiple times bigger then your world latency.
  Reply With Quote
07-06-17, 12:07 PM   #6
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
Yes. The number that is refreshed every 30 seconds is an average, iirc.

There are also two different kinds of latency: http://wow.gamepedia.com/API_GetNetStats
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » The secret of lag tolerance Blizz don't want you know.

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off