HAWKEN servers are up and our latest minor update is live!
Forgot Password? SUPPORT REDEEM CODE

Jump to content


Arnie explains ... Latency, ping, lag, and missing TOWs (aka online gaming)


  • Please log in to reply
36 replies to this topic

#1 ArnieF4440

ArnieF4440

    Muscles

  • Members
  • PipPipPip
  • 2,198 posts
  • LocationDown Under/invading US west servers

Posted January 29 2013 - 04:22 AM

I was sleepy when I wrote this, so I'll update this as I go along

So there's been a few threads regarding missing TOWs and the sort, so I'm gonna do a massive brain dump and explain Ping, Latency, and Lag, a bit of internet networking, and how it affects your gaming. So no need for Wikipedia or Google, lol. I'll try to keep this is simple as possible so everyone can understand :)

So, what qualifies me to explain this:
  • I've been using computers since I was <1 (there's a picture of me with a "C" Book)
  • Bachelor of Computer Science
  • Master of Information Technology
  • Years of gaming
  • Geekyness
  • Because Hey, It's me
First, a bit of disambiguation:
  • Ping == Latency
  • I'll refer to ping as latency and latency as latency
  • Lag != Ping, hence Lag != Latency ... usually. You'll see why I say "usually" soon.
  • "==" is "equals", its programmer speech
  • "!=" is "not equals", again programmer speech
How it affects online gaming
So, this is what everyone actually wants to know:
Low Latency == Good
High Latency == Bad

The better your latency, the quicker things respond, and the lesser the contradictions between "what you see" (your state) and "what actually happens" (server's state).

... So those missing TOWs ???
Sometimes TOWs and other objects may go missing due to a contradiction between your state and the servers state. The server maintains the state of the game "world" and it takes precedence over a players state, promoting consistency. When something happens on your screen, it may not actually happen in the "games" time. So when you fire a TOW before you die, you see it being fired because of your "state" (what you see), but it may have never happened at all according the "game's state", which is managed by the server. When you catch up to the server, the object disappears, because the servers state > your state.

What can cause it?
TOWs enter the land of non existence for a couple reasons:
  • Latency
  • Packet Loss
  • Bugs
Most likely, its latency and packet loss. When packet loss occurs, the data saying "Arnie fired a TOW in direction x, at angle y and time t" never happened because the server never got it. Latency is as above, it happened for you, but the server says "nope, too late, you're already dead, so my reality is your reality for now". Bugs involve programming errors or inefficiencies in netcode, or other bugs in the game that can cause things to not register.


Online gaming (in progress) new/updated
So here's the basics on maintaining "game state" and online gaming. I'm gonna talk about the clients and servers and how they interact with each other through the internet, as well as the fundamental problem.

Clients (player)
Clients hold one instance of the "game state". This version is not necessarily what is "actually" happening in the game, but the version that is relative to the client.

Every time a client commits an action, two game states have to be updated, the clients own, and the servers. Obviously, since the client is holding its own game state in their computer, their version is updated nearly instantaneously, but the server, which may be distant, requires some time to update (relative to your latency). This is what causes discrepancies between client and server.

Servers
The server holds a "master" game state which everything is based off. The game state held by the server takes precedence to any of the clients versions to maintain consistency between clients. As changes happens to the servers "master" game state, they are communicated to all of the clients. Also, as clients update the servers game state with its own changes, the master game state has to be "gracefully" updated without contradictions.

Problems with online gaming
Every player may not have a uniform latency to the server. It's very difficult to communicate a synchronised, real time state amongst multiple clients unless you have a very low latency, high bandwidth network like Myrinet (<7 microsecond latency with upto 10gbps bandwidth), QsNet, Infiniband, or even a LAN (like a LANParty) with a dedicated server within the LAN itself, where the distance between clients is negligible. So various issues like
  • noregs (non registering hits)
  • "lag"
  • latency issues
can occur.

Furthermore...
Internet gaming uses UDP (look in the networking/nomenclature section) to communicate game state. Data transmission has to be timely and frequent.


Ping and Latency
They're the same thing, "ping" is gamer slang for network latency, so I'm just gonna refer to both as latency.

Latency is ...
the delay between an action being invoked/requested and it actually happening. eg. you fire a TOW and the TOW actually being fired.

Latency is determined by the distance between yourself and the server, or more correctly the total distance traveled between the source and the destination including the routing "hops" involved with packet routing through the internet. For every hop a packet takes, there is some minor processing involved to pass it on, adding to the time taken to transmit.

So, effectively:
Latency = Sum(time to travel between routing nodes) + Sum(time to process on each routing node)

A good analogy to explain this is the difference between "displacement" and "distance".
Displacement: the direct distance from source to destination
Distance: the actual distance traveled from source to destination

Posted Image


Lag
"lag" is more of a generic term to describe any form of unresponsiveness while gaming. It can be any, none or a combination of the following factors (these are the most common though):
Latency
CPU performance
GPU performance


A bit of networking and nomenclature
Some nomenclature and explanations on networking, data transfer, and online gaming.

Packets
It's what carries your data to a destination. It holds the source, the destination and the message to be sent.

Packet Loss
When packets travel, they can sometimes be "lost" on the way, or "timeout" (too slow to arrive, or never arrive at the destination in a timely manner, and are hence considered invalid)

Data Routing and Hops
The routing through the internet is not direct like displacement, its more like distance. A packet may travel from a source to a destination using multiple stops, or "hops", to direct it to the right direction. Every stop a packet takes requires some processing to forward it.

Eg. Sending "Hello" to your friend in the city from your home
What you think happens: You -> Friend
What actually happens: You -> ISP HUB -> misc routing place 1 -> {some number of random steps somewhere ...} -> Friend

The Internet
The Internet was not originally designed for low latency, high bandwidth applications like gaming. It is a mish mash of different types and ages of networks and components working together to share information, its an "Infostein". Due to the variety of the parts, low latency is pretty much out the window. Different countries use different technologies, data transfer mediums (Fiber optic versus copper cabling). Everything has to much variability. To achieve low latencies, you'd need dedicated high speed infrastructure.

Netcode
Chunk of code that manages the data transfer between client/server.

Networking protocols - TCP new
TCP = Transmission Control Protocol.

When you want reliable, connection oriented tranmission, ordered receipt of packets, this is your go to network protocol. TCP ensures that the data you send is received intact and without loss. It does this by first establishing and maintaining a "connection" (hence it being connection oriented) between source and destination, and sending ordered packets and confirming that it has been received (acknowledges aka ACKs). If an ACK isn't received from the destination, TCP re-sends that packet of data and keeps going until it "times out". Establishing a connection and ensuring reliable transmission requires extra time, so it is a "slower" protocol. Also, TCP is considered "stateful" protocol, meaning that there is some overhead required to maintain the communication between source and destination.

An example is like playing ping pong between P1 (source) and P2 (destination):
  • Establish connection:
    • would you like to play ping pong?

    • yes.

    • Ok, lets play
  • send packet
    • here I'm hitting a ball
  • reply with ACK
    • OK, you've hit the ball, I'm hitting it back

    • Sweet, I'm getting ready to hit it again
  • send another packet
    • Here I'm hitting it again
  • don't receive packet
    • I'm still waiting bro

    • *timeout*

    • *magic ball* here I'm hitting it again
  • rinse and repeat

  • Close connection
    • *game over* :D
Networking protocols - UDP new
UDP = User Datagram Protocol.

UDP is kinda the opposite of TCP. It focusses on sending timely packets but it doesn't care about reliability, it just keeps sending them as necessary. Hence it is considered a "streaming" protocol. UDP just doesn't care, lol. A source sending data using UDP doesn't establish a connection, doesn't maintain state, and doesn't care if you've received it or not. Typically, this protocol is used for streaming stuff like in Twitch/JustinTV streams, as well as internet gaming. Also, UDP reduces latency :D

Back to the ping pong example
  • start sending packets
    • here I'm hitting the ball (1)

    • I've received the ball

    • here I'm hitting the ball again (2)

    • I've received the ball

    • here I'm hitting the ball again (3)

    • woops, I missed it

    • i don't care that you've missed it, and I don't know if you did or not, so here I'm hitting the ball again (4)

    • I've received the ball
  • finish sending packets
    • *game over* ... what just happened XD
Things you can do to test your internet connection
Here's a couple easy to access utilities available to test your Internet connection

TestMy.Net
http://testmy.net/
I reckon this is a bit more faitful to the true bandwitdth of your internet connection

Ookla Speedtest
http://speedtest.net/
Measures your download and upload speed, and your ping

Ookla Pingtest
http://pingtest.net/
Measures your "ping", packet loss, line noise and quality.

ISP Geeks
http://www.ispgeeks.com/wild/


A cool exercise
There's a command available in windows systems called "tracert", which shows the path data takes between a computer and a destination
  • go to command prompt (type "CMD" in run)

  • in command prompt type "tracert [website address]" (eg. tracert google.com)

  • watch the routing fun ask your packets are traced to the destination

if I've missed anything, or something needs to be corrected, tell me about it :)

Edited by ArnieF4440, March 03 2014 - 05:00 PM.

Posted Image
Me: Youtube | Drop Bears
Guides: Hawken Tips and Tricks | Fraps + Compression | Lag + Gaming
Rig: i7-920 + H50 | MSI X58A-GD45 | Corsair Dominator 12GB | 2x EVGA GTX 660TI SC+ 3GB | OCZ Vertex 2 120GB | Corsair HX1000 | CM HAF932

#2 Roundlay

Roundlay

    Advanced Member

  • Members
  • PipPipPip
  • 730 posts
  • LocationTokyo

Posted January 29 2013 - 04:37 AM

tl;dr If you're having any of the connectivity issues described above, upgrade to a better internet plan.

#3 Incapacity

Incapacity

    Advanced Member

  • Members
  • PipPipPip
  • 290 posts
  • LocationCanada

Posted January 29 2013 - 04:42 AM

So... for those of us that actually know what the internet is, and how it works (no offense, but you're reading like an about.com article for seniors) ... we still come to the point where these TOW problems are not related to lag or packet loss at all. I know when I get packet loss or a ping spike, because it affects much more than my weapons. I've just sat in disbelief watching a rocket do 0 damage to someone after impact, while others do damage to that same target with bullets or their own rockets. Nothing stops or stutters or catches up - all fluid gameplay.

Your baby's guide to networking can't address what may possibly be a bug introduced recently.

Edited by Incapacity, January 29 2013 - 04:42 AM.

last.fm/user/sincapacity objectively good taste
plusle.nabyn.com art things

#4 cpl_bradders

cpl_bradders

    Advanced Member

  • Members
  • PipPipPip
  • 221 posts
  • LocationUK

Posted January 29 2013 - 04:44 AM

Thanks ArnieF4440

Read this post kids, all good info here :)

Operation of this mech binds you to the terms outlined in the Life/Death Policy Agreement, Section 2.

You are immediately liable for any and all damage incurred to this mech.


#5 cpl_bradders

cpl_bradders

    Advanced Member

  • Members
  • PipPipPip
  • 221 posts
  • LocationUK

Posted January 29 2013 - 04:51 AM

 Incapacity, on January 29 2013 - 04:42 AM, said:

So... for those of us that actually know what the internet is, and how it works (no offense, but you're reading like an about.com article for seniors) ... we still come to the point where these TOW problems are not related to lag or packet loss at all. I know when I get packet loss or a ping spike, because it affects much more than my weapons. I've just sat in disbelief watching a rocket do 0 damage to someone after impact, while others do damage to that same target with bullets or their own rockets. Nothing stops or stutters or catches up - all fluid gameplay.

Your baby's guide to networking can't address what may possibly be a bug introduced recently.

With all respect

Bear in mind that the majority of Hawkenites may not know as much as you/me/OP, and so may get something out of the article, even if they just go a away and do the speed test and realise their connection isn't exactly helping their K/D/A ratio.

Operation of this mech binds you to the terms outlined in the Life/Death Policy Agreement, Section 2.

You are immediately liable for any and all damage incurred to this mech.


#6 Supernoob

Supernoob

    Advanced Member

  • Members
  • PipPipPip
  • 182 posts
  • LocationNew Zealand

Posted January 29 2013 - 06:17 AM

With all respect,
99% of gamers know 1: Ping is related to internet speed
2: Big ping = lag, 3: lag = bad

That being said, many times the mis fire of my TOW has nothing to do with me being dead.

I am assuming it is due to packet loss from connecting form NZ to US West.
Most likely due to the nature of the game or the long distance connection. Fairly sure it is not due to my net being bad.

I have had shots fired that disappear right before hitting people before.

Edited by Supernoob, January 29 2013 - 06:19 AM.

Posted Image

#7 AsianJoyKiller

AsianJoyKiller

    Lithium Cellophane Unicorn Salad

  • Full Members
  • PipPipPip
  • 8,011 posts
  • LocationWI

Posted January 29 2013 - 06:17 AM

 Incapacity, on January 29 2013 - 04:42 AM, said:

So... for those of us that actually know what the internet is, and how it works (no offense, but you're reading like an about.com article for seniors) ... we still come to the point where these TOW problems are not related to lag or packet loss at all. I know when I get packet loss or a ping spike, because it affects much more than my weapons. I've just sat in disbelief watching a rocket do 0 damage to someone after impact, while others do damage to that same target with bullets or their own rockets. Nothing stops or stutters or catches up - all fluid gameplay.

Your baby's guide to networking can't address what may possibly be a bug introduced recently.
In my experience of online gaming, noregs (shots that are fired, hit, yet do no damage) are a network/netcode problem as well, and not all that dissimilar from misfires (you clearly fire clientside, but the server says "lolno").

[HWK]HUGHES, on July 03 2013 - 11:07 PM, said:

AJK is right

The Sinful Infil HEAT Cannon Hustler, Cloaking and Smoking, C-Class Swagger, Ballin' n' Brawlin'


#8 robotokom

robotokom

    Advanced Member

  • Members
  • PipPipPip
  • 373 posts

Posted January 29 2013 - 06:20 AM

 AsianJoyKiller, on January 29 2013 - 06:17 AM, said:

 Incapacity, on January 29 2013 - 04:42 AM, said:

So... for those of us that actually know what the internet is, and how it works (no offense, but you're reading like an about.com article for seniors) ... we still come to the point where these TOW problems are not related to lag or packet loss at all. I know when I get packet loss or a ping spike, because it affects much more than my weapons. I've just sat in disbelief watching a rocket do 0 damage to someone after impact, while others do damage to that same target with bullets or their own rockets. Nothing stops or stutters or catches up - all fluid gameplay.

Your baby's guide to networking can't address what may possibly be a bug introduced recently.
In my experience of online gaming, noregs (shots that are fired, hit, yet do no damage) are a network/netcode problem as well, and not all that dissimilar from misfires (you clearly fire clientside, but the server says "lolno").
I try to think about it like getting hit in the jaw you might not even know you got hit, you think you are still in the fight but you are not in the fight you are on the ground bleeding.

#9 WickedSoN

WickedSoN

    Advanced Member

  • Members
  • PipPipPip
  • 117 posts
  • LocationCalifornia

Posted January 29 2013 - 06:28 AM

I was thinking packet loss on my end. Bui think its because I get nasty jitter with comcast at times..

Edited by WickedSoN, January 29 2013 - 06:28 AM.


#10 AUTOAL

AUTOAL

    Advanced Member

  • Members
  • PipPipPip
  • 284 posts

Posted January 29 2013 - 06:34 AM

sometimes i have 500hp and TOW vanished in the air. and this most happened when i click mouse too quick

#11 M3KKA

M3KKA

    Advanced Member

  • Members
  • PipPipPip
  • 60 posts
  • LocationWestern Australia

Posted January 29 2013 - 06:43 AM

Thanks Arnie, i found this to be wonderfully informative.
Posted Image

#12 _Hex_

_Hex_

    Advanced Member

  • Members
  • PipPipPip
  • 235 posts

Posted January 29 2013 - 07:04 AM

Informative for those who don't know much about ping and packet loss. But just because you are experiencing problems in ONE game doesn't mean you should upgrade your internet plan. I had issues last week with rubberbanding around, but it was only happening in hawken (~50ms ping) But yesterday I played with no problems whatsoever.

TL;DR: There are many more variables that can contribute to in-game problems.

Good guide though! :D

View PostLeonhardt, on April 30 2013 - 04:00 AM, said:

alt+F4 fixes this. Reinstall and as soon as you see it quickly hit alt+F4. If the game crashes restart and try again until its fixed.

#13 ScHizNiK

ScHizNiK

    Advanced Member

  • Members
  • PipPipPip
  • 244 posts
  • LocationUK

Posted January 29 2013 - 09:05 AM

I don't believe its networking my connection is pretty good and I get no packet loss.
I had it happen a few times in the same game once, I tried to get some information about how it looks on the other side, I met with the reply "lol your aiming is bad".

I don't think the opponents even see the shot, I'm not sure if it happens with other weapons BUT with the Tow you can see it travel hit and vanish on contact with no damage or explosion.


*edit this was not introduced last patch I clearly remember it happening before that.

Edited by ScHizNiK, January 29 2013 - 09:08 AM.

Posted Image

Quote

I can no longer sit back and allow Communist infiltration, Communist indoctrination, Communist subversion, and the international Communist conspiracy to sap and impurify all of our precious bodily fluids.


#14 Sylhiri

Sylhiri

    Advanced Member

  • Full Members
  • PipPipPip
  • 3,135 posts

Posted January 29 2013 - 09:25 AM

I'm not trusting that pingtest.net....

I get 128ms in the West and 72ms in the East

I live in the West....

[13:14] <nonsiccus_work> uh oh

there's gravy in my keyboard

----------------------------------------------------------------------

[11:18] <+shosca> if you wanna play ar, go play zerker
[11:18] <Hyginos> and if you want to play zerker, go smc
[11:19] <someone> if you want to play sustain, please go and die in hell


#15 Teljaxx

Teljaxx

    Advanced Member

  • Full Members
  • PipPipPip
  • 2,448 posts
  • LocationIn the thick of 8;;8

Posted January 29 2013 - 03:51 PM

This is a good guide, and will hopefully help more people give useful feedback about errors like the disappearing TOWs. It always bugs me when people do not know enough about how things like this work and end up giving bad feedback because of that.

This is also why I do not like that lately the term "Lag" is being used for both high latency issues and computer performance issues. So if someone blames a problem on lag, you cannot tell if they mean that their computer is running slow, or if they have a bad network connection.

I wish that the speedtest that you linked to would check my packet loss, though. Firefox does not seem to like the version of Java that it wants to use and will not let it run. A least I know my ping is fine, though.
Always on the move / My trigger finger itches / If it moves, shoot it!  Posted Image8;;8

#16 ArnieF4440

ArnieF4440

    Muscles

  • Members
  • PipPipPip
  • 2,198 posts
  • LocationDown Under/invading US west servers

Posted January 29 2013 - 05:03 PM

Bare in mind, this is a heavily simplified and cut down version of what actually happens, the Internet is a whole lot more complicated than what I've explained. I suppose its good for explaining the basics to the general public who do not know exactly how the Internet works.

But I'm gonna get a bit more into how online gaming works, different types of networking protocols (UDP vs TCP/IP), and improve the guide a bit, I was sleepy last night when I wrote it up XD.

 Roundlay, on January 29 2013 - 04:37 AM, said:

tl;dr If you're having any of the connectivity issues described above, upgrade to a better internet plan.
Not quite, because of this:

 _Hex_, on January 29 2013 - 07:04 AM, said:

But just because you are experiencing problems in ONE game doesn't mean you should upgrade your internet plan. I had issues last week with rubberbanding around, but it was only happening in hawken (~50ms ping) But yesterday I played with no problems whatsoever.



 Incapacity, on January 29 2013 - 04:42 AM, said:

So... for those of us that actually know what the internet is, and how it works (no offense, but you're reading like an about.com article for seniors) ... we still come to the point where these TOW problems are not related to lag or packet loss at all. I know when I get packet loss or a ping spike, because it affects much more than my weapons. I've just sat in disbelief watching a rocket do 0 damage to someone after impact, while others do damage to that same target with bullets or their own rockets. Nothing stops or stutters or catches up - all fluid gameplay.

Your baby's guide to networking can't address what may possibly be a bug introduced recently.
True mate, its a rather simplified explanation because of this XD:

 cpl_bradders, on January 29 2013 - 04:51 AM, said:

 Incapacity, on January 29 2013 - 04:42 AM, said:

-snip-

With all respect

Bear in mind that the majority of Hawkenites may not know as much as you/me/OP, and so may get something out of the article, even if they just go a away and do the speed test and realise their connection isn't exactly helping their K/D/A ratio.


 AsianJoyKiller, on January 29 2013 - 06:17 AM, said:

 Incapacity, on January 29 2013 - 04:42 AM, said:

-Snip-
In my experience of online gaming, noregs (shots that are fired, hit, yet do no damage) are a network/netcode problem as well, and not all that dissimilar from misfires (you clearly fire clientside, but the server says "lolno").
Yeah, I put that under "bugs", gonna elaborate it a bit more soon. Sometimes noregs can also be a discrepancy caused by latency issues on the server's, your's and the other player's end.

Remember, every player may not have a uniform latency to the server. It's very difficult to communicate a synchronised, real time state amongst multiple clients unless you have a very low latency, high bandwidth network like Myrinet (<7 microsecond latency with upto 10gbps bandwidth), QsNet, Infiniband, or even a LAN (like a LANParty) with a dedicated server within the LAN itself, where the distance between clients is negligible.

Edited by ArnieF4440, January 29 2013 - 05:09 PM.

Posted Image
Me: Youtube | Drop Bears
Guides: Hawken Tips and Tricks | Fraps + Compression | Lag + Gaming
Rig: i7-920 + H50 | MSI X58A-GD45 | Corsair Dominator 12GB | 2x EVGA GTX 660TI SC+ 3GB | OCZ Vertex 2 120GB | Corsair HX1000 | CM HAF932

#17 machmanx

machmanx

    Advanced Member

  • Members
  • PipPipPip
  • 789 posts

Posted January 29 2013 - 05:18 PM

Thank you very much, Arnie Sen-sei! :D  Very informative stuff.

For a bandwidth test that does NOT suck up to technologies like "Powerboost" or "Accelerators", try http://www.ispgeeks.com  They have a variety of tests like a CAPACITY TEST and a VOIP (quality) test and even a FIREWALL test.

Me Built PC | Win 8 Pro | AMD Phenom II X4 B60 | Nvidia Geforce GTX 460 (314.22) | 8GB DDR3
DESKTOP CLEAN Nvidia Driver Install | LAPTOP CLEAN Nvidia Driver Install | PhysX Helpful Info


#18 Roundlay

Roundlay

    Advanced Member

  • Members
  • PipPipPip
  • 730 posts
  • LocationTokyo

Posted January 29 2013 - 08:31 PM

 ArnieF4440, on January 29 2013 - 05:03 PM, said:

 Roundlay, on January 29 2013 - 04:37 AM, said:

tl;dr If you're having any of the connectivity issues described above, upgrade to a better internet plan.
Not quite, because of this:

 _Hex_, on January 29 2013 - 07:04 AM, said:

But just because you are experiencing problems in ONE game doesn't mean you should upgrade your internet plan. I had issues last week with rubberbanding around, but it was only happening in hawken (~50ms ping) But yesterday I played with no problems whatsoever.

Sure, it doesn't necessarily mean you should upgrade your internet plan. If your goal is improving upon high latencies, packet loss, etc., in any meaningful sense though, software based solutions like modifying TCPAckFrequency (Leatrix Latency Fix will do this), for example, are middling at best.

#19 burns1124

burns1124

    Advanced Member

  • Members
  • PipPipPip
  • 700 posts
  • LocationBuffalo, NY

Posted February 06 2013 - 07:59 AM

Bump to top, as some jackwagon has decided to post another lag thread, full of misinformation.

#20 ArnieF4440

ArnieF4440

    Muscles

  • Members
  • PipPipPip
  • 2,198 posts
  • LocationDown Under/invading US west servers

Posted February 06 2013 - 08:56 AM

 burns1124, on February 06 2013 - 07:59 AM, said:

Bump to top, as some jackwagon has decided to post another lag thread, full of misinformation.

Lol, was it another Omega22 thread? jk jk.

Anyways, I'm back from my little break ... sorta ... so I'll be finishing what I started within the next day or so XD. Been working on matchmaking algorithms XD
Posted Image
Me: Youtube | Drop Bears
Guides: Hawken Tips and Tricks | Fraps + Compression | Lag + Gaming
Rig: i7-920 + H50 | MSI X58A-GD45 | Corsair Dominator 12GB | 2x EVGA GTX 660TI SC+ 3GB | OCZ Vertex 2 120GB | Corsair HX1000 | CM HAF932




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users