hi, i need to graph the packet delay for a game called league of legends, the game uses udp and a port range between 5000-5500. im pretty sure that the delay time is calculated from the udp stream, see explanation in the link at the end. inside the game you can see what they call ping time in ms, but how they measure that im not sure. from a 2000packets capture midgame ive already calculated the following times(script at the end):
but all these come up with less then 10ms, normal ping time for the game is 20ms. do you think they calculate ping time on the server side and send the ping data back with the game data? this is why i belive that ping time is calculcated from the UDP packets: i used the HSFC traffic shaper class to make sure ping is calculated from the UDP packets the game uses for data traffic. other ports/protocols are used as well. for that i created two classes: 1:20 and 1:30, 1:20 holds the lol packets and a scp stream if started. 1:30 is the catch all for the rest. if scp isnt running league of legends (lol) ping is fine, if http(1:30) is downloading in parrallel with ~200kb/s as expected lol ping is fine - now if there were some other data connection that does not fall beween in the games udp port range ping would spike because of the http download. now with a running scp download ping goes up to at least 100ms, normally its 20ms. traffic shaper / python code to calculate packet times: http://pastebin.ca/2467393 tcpdump file: http://www.file-upload.net/download-8186822/lol.pcap.html asked 16 Oct '13, 15:43 newusergreek edited 17 Oct '13, 00:39 |
3 Answers:
Leage of Legends seems to use an 'in protocol' ping command (and protocol). So you need to understand the protocol to be able to calculate the same 'ping time' that the game client shows. This includes:
Fortunately there is a dissector for the Leage of Legends protocol. Unfortunately, that dissector is not part of the official Wireshark code base. So, if you want to dissect the protocol, you need to add that code to the Wireshark code and compile your own version. Please contact the original author of that dissector (see link above) for any further information how to build it, how to use it and what version of Wireshark it is compatible with. Maybe they can also provide a binary version of Wireshark that includes the dissector. Regards answered 16 Oct '13, 16:35 Kurt Knochner ♦ edited 16 Oct '13, 17:10 |
I would guess you're measuring round-trip times, and the in-game UDP measurements are one-way measurements. Typically, this is how financial market data latencies are measured (using one way) since UDP is unidirectional. answered 16 Oct '13, 19:25 hansangb |
Hi, I don't know what you need this for or what your intentions are, but there is a very simple way to do this using a program called Bot of Legends. This program injects itself into League of Legends so it is able to grab things like ping fairly easily (among other things you're probably not interested in). As an example here is a script for avg ping (it's in lua): https://privatepaste.com/e75dfe18a3 answered 26 Nov '13, 05:07 NewGuy |
yes it is, with the internal ping command/protocol (see my answer). Your way to calculate the response time will create wrong results, because:
See the following command/response sequence of the Leage of Legends protocol (UDP frames in and out).
cmdx is: client -> game server UDP outgoing respx is: game server -> client UDP incoming
What you calculate is: delta(cmd2,resp1) and delta(cmd4,resp2)
However, resp1 is totally unrelated to cmd1 and resp2 is unrelated to cmd4.
You cannot use just the UDP packets for the calculation, as Leage of Legends has its own protocol on top of UDP with commands, responses and internal time stamps.
So, as I said in my answer you need to understand the Leage of Legends protocol to be able to calculate the correct 'delta'.
yes, i knew that i didnt knew which response came in to what packet. i just guessed.