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
- 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
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
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
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

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
 
- would you like to play ping pong?
- 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
 
- OK, you've hit the ball, I'm hitting it back
- 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
 
- I'm still waiting bro
- rinse and repeat
 
- Close connection
 - *game over*  
 
- *game over* 
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

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
 
- here I'm hitting the ball (1)
- finish sending packets
 - *game over* ... what just happened XD
 
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.

 

 5
 5 


 
				
				
			 
				
				
			 
				
				
			 
				
				
			
 
				
				
			 
				
				
			 
				
				
			 
				
				
			 
				
				
			
 
				
				
			
 
				
				
			
 
				
				
			 
				
				
			
 
				
				
			 
				
				
			









 
								




