Let's Discuss Online Game Lag

What causes it (other than slow data rates) and how can you avoid it? How do games compensate for it and how can it be used to your advantage or disadvantage?

i’m bring this up because, truth be told, i’m new to online gaming. LAN gaming has been my thing since highschool (late 90s) so i’ve not had to deal with this kind of crap since i started gaming on PSN. i don’t understand exactly how games take lag into consideration except that i have an idea how i would do it. Games like GTA4 are my favorites to play online but sometimes there are users in the game that lag down the fun. i assume it’s because their connection is slower. Therefore their copy of the game plays out of sync…and it’s almost always to their advantage.

in deathmatch games i sometimes seem to be aiming too short or too far ahead of moving targets. Targert seem to twitch out and flash about, dodging my every bullet like a villain from DragonballZ or The Matrix. Other players somehow shoot me THROUGH WALLS. i can duck and dodge behind any structure but somehow my character’s still scrambling for cover on their screen.

i can crash into a fellow racer, flip his car and run him off the road only to have him spazz out and magically appear 2 blocks ahead of me in 1st place. i’ve even had players crash, get out of their car, open fire on me, kill me, and POOF, they’re 3 miles away. (How does THAT happen!?)

i sometimes smash into traffic that spawns out of NOWHERE. Sometimes the cars i attempt to steal disappear as i’m climbing into them. i’ve been shot at point-blank by a player who seemingly teleported from 6 blocks away straight to my exact location.

in a simple race just moments ago, i found myself being repeatedly rammed by another race. He smashed me into walls, into traffic and even crashed himself into a barrier, blocking my path. …and yet after every collision his car magically appeared half a block beyond the destruction piling up on MY end of the game. His out-of-sync car kept speeding out of control into every other obstacle, effectively blocking me with stalled cars and piles of dumpsters and garbage. MY game on my end was assuming the position of the other player incorrectly, causing his car to crash into fucktons of cars pushing them into my way while on his end he calmly drove ahead with nothing obstructing the road.

Hitbox lag, glitched vehicle physics, how and why (specifically) does this occur? How do the hardwired mechanics of online games manifest these glitches? How can they be avoided either in the development stage or post-release patches? How can i tell if the lag is on MY end or on THEiRS?

-Kawai Tei-

I remember before they took off the interleave on my adsl2+ I had 120ms ping in most servers, it was so bad I used to tether my phone to my laptop via bluetooth, laptop to desktop via ethernet and play CS source through that ghetto setup. Believe it or not it was actually less laggy, but a lot more expensive…

It’s not exactly the data rate that’s the problem - you don’t need that much bandwidth (MB/s) to play most online games. What matters is how quick client computers - the gamers’ PCs - can talk back and forth with the server. This is measured in ping. A ping of 30 means it takes 30 milliseconds for information to travel from your computer to the server.

Since not everyone is going to connect at exactly the same speed, games need to have a way to smooth out the differences between players. This is what’s generally referred to as lag compensation. I can’t tell you exactly how it works, since I believe there are numerous ways to do it, and I know none of them. Basically though, even in servers where everyone has decent pings, this results in small discrepancies between what you see and what actually happens.

For instance, someone is shooting at you, so you run around a corner to evade fire. Because of the delay between him and you, the server has to compensate. It does the math and decides that he hit you, which registers after you appear to have gone around the corner. Very rough explanation but maybe someone else can go into more detail.

As for telling who’s fault it is, just check: is it one player behaving strangely, or everyone? If it’s everyone, it’s probably you who has the bad connection. To be sure, you need to check your ping and the ping of other players. Most games provide a way to check in-game. For shooters and such games, you need a pretty low ping. Pings between 0 and 50 are great, 50 to 70 is good, 80 to 100 is starting to get bad, and over 100, you’re going to start seeing problems fast. In other types of games, like RTS games, pings can be much higher because they aren’t so fast paced and dependent on quick actions.

Perhaps someone else can elaborate or correct me?

My ping is on average probably ~120 ms.

interleaved DSL is like interlaced TV, lower quality to save bandwidth, they use it on noisy phone lines in the suburbs. When they took off interleave my ping became 20ms on some servers

also in CS some players fuck with the lag compensation rate (lerp) in console which causes them to appear laggy and teleport-walk around the map while they see other players walking smoothly

That’s pretty much how i figured it works; the game server takes into consideration the current position and movement of each subject on each participating game (each gamer’s screen). The server deals kills or movement data depending on how each individual game is being played, unfortunately because of the lag and inconsistency between games, the server often has trouble debating over who to grant the kill shot.

i tried explaining to my room mate (who watches, but never plays) that each participant has his/her own copy of the game running with its own elements, NPCs, traffic etc. factored into the “master copy” of the game running on a server. Each ‘copy’ of the game has to work with each other to communicate the position and movement of everything within the playing area.

The game server can only be so fair without taking a bias turn towards any particular player. it’s kinda like how some of us used to play guns as kids, except there’s an all-seeing mediator. When a kid yells, “Dude, i shot you! Fall over, you’re dead!”, the mediator (server) reviews the data and determines if any player indeed got shot. Just as kids see the world through their eyes, each ‘copy’ of the game is viewed and played-out differently on every participant’s screen, managed by their OWN console.

i also explained that to cut down on data transfer, each player’s ‘copy’ of the game only renders traffic and characters within a 500ft radius. if a player retreats to another part of the city, since no other player could SEE him, his data stream is moreorless removed from the data streamed until he comes back into view (on radar) of other players within the game. This explains how sometimes players can magically appear near or far, because their data stream cuts in and out during longer races.

-Kawai Tei-

EDiT : While i can’t see my ping in PSN games, it’s likely not me who’s causing the slowdown. in a game of 5-10 races, there’s usually one or two glitchfest players while the others are smooth. Unfortunately the glitchy ones are usually the winners. They’re the one leaving wrecks and trash piles behind for the rest of us to run into. LOL As far as their games are concerned, their driving is smooth. To the rest of us, their cars keep swerving into traffic or flying through busy intersections.

Halo co-op with shitty-internetted Mexican friends is chopped to the max

Yeah, the lag compensation for source games is based on what the client sees the other person’s position as when they shoot at them, so you get shot around corners a lot.

I wish it would work better then…half the time my shots make bloodstains(so I know I hit) but deal no damage in source engine games:meh:

My ping is generally 70 - 90 online.

But my download rate is 6 MB/s and 750 KB/s.

I don’t know the exacts, but all of my friends have much lower download rates, but get much better pings. What would cause that?

6 MB/s… I’ll trade you my occasional 30 ping for that.

150ms on average, 300kb/s connection If it’s feeling it. Sometimes, well quite often my ping goes as far as 250ms, rendering it unplayable.

I can’t really game online, for some reason I get horrible lagspikes. Like, every 10 seconds, I get a 2-6 second freeze, ping jump to about 700-800.

It happens on both my home and university house connections, which is strange because I used to be able to use both for online gaming.

So source engine base’s hits on a combination of what all the players involved see, then the server decides what hit and what didn’t?..so then how did this work? The Replay is a recording of what the server saw is it not? Cause that video is certainly different from where I aimed and saw people… :confused:

It’s more complicated than that, but that is the gist of lag compensation.

anyways, i get about 20 ping, 20Mb/s dl on average, but it goes as low as 5ms when the server is located somewhere in the midwest. Server ping has a lot to do with location, if you have fast dl/ul speeds, you can get bad ping if the servers really far away.

Speed of light limitations and/or network congestion caused by too many connections through too thin a pipe.

While playing a GTA4 race a bit ago, i was racing against one other player. After crashing my nearly undrivable car, i ditched it and ran for a new one. i already lapped my opponent once so i had plenty of time. The other racer was nearly half a mile away. On my way across the street, about 5 seconds after ditching my car, my character literally burst into flames.

For no conceivable reason, i seemed to have spontaneously combusted, collapsed and burned to death. When i respawned, i came back on the OTHER SiDE OF TOWN and went from 1st place to last. immediately, i was run over by my opponent and killed a second time.

FML ( fuck my lag )

-Kawai Tei-

Don’t play as a vampire :bulb:

This. Or buy sun lotion.

Lowest I’ve seen for ping on servers is around 50 so my range is like 50-150 or something like that.

Founded in 2004, Leakfree.org became one of the first online communities dedicated to Valve’s Source engine development. It is more famously known for the formation of Black Mesa: Source under the 'Leakfree Modification Team' handle in September 2004.