how people on opposite sides of the earth can play video games together seemlessly when these games require split second actions

1.13K views

how people on opposite sides of the earth can play video games together seemlessly when these games require split second actions

In: 4913

50 Answers

Anonymous 0 Comments

Most of these answers are wrong for mainstream games with modern networking.

Packet sizes do not matter nearly as much as they used to. Keeping packet sizes small is mostly a matter of reducing server bandwidth costs, not decreasing latency.

With no latency compensation, you have to lead targets, and it is noticable even with relatively low pings. Almost no games do this anymore.

Extrapolation is the next step up: instead of showing where you think a player is, you assume they’ll keep moving in whatever direction they were holding, and show them moved forward by half your ping. This leads to a lot of visible errors though because if it turns out they didn’t keep going straight, not only was your extrapolation wrong, but now you’ve got to extrapolate out again. Even with blending (interpolation), this becomes very noticable at even moderate pings. And as a player, the server is still half your ping behind you, so you can still get shot around corners.

Not many games do just extrapolation anymore either. Often, it’s a fallback method – if your ping gets too high for rollback or your connection gets too unstable, the client will start extrapolating to make up the difference. You can see this in Overwatch for instance.

There’s some variation, but the main strategy is to do some form of rollback. The server remembers where everything was every tick for the last few ticks, and so when you shoot, you also send a timestamp. The server then briefly rewinds time for the target *but not for your shot*, so the server has an accurate approximation of where the enemy was on your client at the time you fired.

The ELI5 version is that when you play a modern shooter, you’re firing bullets into the past. That’s how you can hit things. That’s also why you can be shot after you think you made it to cover – the other player is shooting into your past.

The laggier someone is, the further into your past they might be shooting. This is also why most games have some cutoff, beyond which they’ll usually start extrapolating.

Any action can be rolled back. Typically, games roll back the shooting rather than the movement, because occasionally getting shot barely around a corner isn’t nearly as bad as having to guess which way your target will move and aim ahead of that. But often, things like dashes or shields might get rolled back too, so your shield actually projects into the past to cover you.

You are viewing 1 out of 50 answers, click here to view all answers.