I've had quite a bit of experience with multiplayer game networking and I've read lots of stuff about the way Source handles things so I'd like to educate you lot.
Ping?what is ping?
Ping is the time it takes for either the client to send a packet to the server and get a reply or vice versa. A packet is the name given to a segment of network data, these packets usually have a header containing the destination IP(server or client) the IP it came from(to identify which user sent it) and various other things like a checksum but those aren't important for this.
When you hold TAB you can view your ping, though for some reason it says latency, which is a measurement of how long it takes a packet to reach the destination without a reply, But it's actually ping.
OMG he's making me lag!
Often I get accused of 'making people lag' due to having either 200 - 300 Ping. This is not true and you should slap anyone who says this. The only time this is true is when playing a very old game that is poorly programmed. In modern games a high ping player cannot affect your game speed or your ping due to the fact that networking code is asynchronous to the main game, this means that the game physics, weapons etc on the server are still running even if your packets take a year to arrive.
Kick the high pingers?
It depends how you define high ping, on the US servers I get 200 ping and 300 to the UK, while these are fairly high I will explain why having these pings doesn't change much.
Using 300 ping as the extreme example, this means that if I press W on my client it simulates me moving forward instantly, however the server still has to wait 150ms before it will detect I press W. Now the advantage to me is that I can potentially see you before you can see me, due to the fact that my movements are simulated on my side, so if the other player has 0 ping(on LAN) they will have to wait 150ms before they will see me jump down, pop round the corner etc. The downside however is that I cannot escape as fast. let's say I'm looking over a box and someone runs in front, if I crouch on my screen I will be impossible to hit, however he will have 150ms to headshot me as my crouch button hasn't be detected by the server yet so he can easily kill me.
Another thing to remember is that the server caches 1000ms worth of entity data, entities are everything in the world from players, bricks(in Breakfloor) and any physics entity. This is where the tick count comes in, a 100tick server will store this entity snapshot every 10ms for the default 1000ms total, so that's 100 snapshots / tick. Other servers use 66 tick or some other number depending on accuracy required. These snapshots are used to determine if you've hit something, or walked into a physics entity. for example if I'm camping with an AWP and looking down a small hallway and someone runs past me, on my screen I will shoot them and they should be dead. However due to having 300ping my bullet will have to wait 150ms before it's simulated on the server. Obviously currently on the server the player has long ran past this hallway and my shot will obviously miss, so it looks at my ping and checks to see if I hit the player by looking at the nearest snapshot which using 100 tick is either the 15th or 16th snapshot. Of course if the enemy player also has 300ping they will die 300ms after I initially fired the bullet, this is the reason why many people say BS you couldn't have shot me etc etc.
Can I reduce my ping?
Ping increases mainly based on distance to the destination host / client, because with distance you have more hops. Hops are the name given to servers owned by your ISP and others that simply relay your data to the destination, as I'm in Japan when connecting to a UK server my packets must go through around 5-10 hops before it reaches the server. Now there isn't a lot you can do about this as most of the hop servers will be out of your control so other than a change of ISP(which may not improve anything as ISPs usually lease lines from a main provider) you cannot affect your base Ping. There are other local things that may affect your ping however. Things such as an overloaded firewall, because games like CSS have quite a lot of packet flow, so if your PC is already under a lot of strain(CPU usage) your firewall may be slowing you down. The way to fix this is either disable your firewall which probably isn't the best idea or get a router which will very likely come with a hardware one.
I've often heard people telling me to type cl_cmdrate 0-1 to improve my ping, this is very very very false and you should kick anyone who does this from the server, this command merely limits your outbound packets per second to your designated level, so if I set it to 1 then I'm only sending one packet per second to the server for movement, what this means is that visually to other players I will look very very laggy and this is a form of exploit as you're very hard to hit. People think this reduces ping however it doesn't! your ping stays the same it only fools the client ping system to think you have a lower ping however I'm not totally sure why this happens, maybe the timestamps get changed due to using this command. The default is cl_cmdrate is 10 and you can set it from 10-100 without problems. 100 will give you and others a more smooth and fair gameplay experience(I use 100).
Edit By Alex:
1) Nice post, must have taken a while so kudos
2) You didn't mention it but by typing "net_graph 3" into console you get a nice panel displaying all the details of your connection.. In fact I'm going to go screen shot it and make a new post
Sign In
Register
Help
Start a new topic
Add Reply


MultiQuote







