Masking Latency

1 reply [Last post]
Posts: 465

Would be nice to list or describe techniques (or libraries) of masking latency.

I don't know a lot about networking but I have been interested in how games go about handling latency. Some of these I have made up the name for since I don't know what it is actually called.

**********************
Rollback collision detection
Game runs in real time for every player, when the person shoots, the server rolls back (hidden instance) depending on the latency to determine whether the player actually shot the person or not.

Used In

  • Most Half-Life multiplayer games
Pros
  • Suitable for low latency FPS games
  • Latency is completely hidden up to approx 100 ticks
Cons (When at high latency)
  • latency is very noticeable above approx 100 ticks
  • High amounts of latency will allow players to shoot players behind walls
  • CPU/Network intensive, usually max of 24-32 players

**********************
Induced input latency
Game lags slightly behind the players actions at a set latency. So if a player inputs an action, the actual action will happen exactly X milliseconds later.

Used In

  • Starcraft BW
  • Street Fighter 4
Pros
  • Suitable for very high latency (up to 500ms, basically can play anyone in the world)
  • Can be adjusted on the fly
  • Provides very predictable and smooth gameplay even at very high latency
  • Very simple
Cons (When at high latency)
  • Reacting to time critical events can be difficult and frustrating
  • You have to re-learn how to control units according to lag every game
  • Lag tactics become prevalent (some strategies are impossible/too-powerful in high latency conditions)

**********************
GGPO
GGPO uses a peer-to-peer topology to run a complete copy of your game for each player, transmitting controller inputs over the network to keep these copies in sync. Each player's inputs are sent to their copy of the game without having to wait for their opponent's to arrive over the network.

If the simulations diverge, GGPO rolls back to the most recent accurate state, corrects the mistake, and jumps back to the current frame, all before the player can notice. This provides the illusion of lag-free gameplay.

Used In

  • "Re-mastered" classic fighters
Pros
  • TBA (It seems similar to how CS works)
Cons (When at high latency)
  • TBA

Posts: 10

PING, latency or what ever you wanna call it, is in millisecond scale (well most of times) the delay between server-client communication which is being achieved by sending/receiving packets. Now when it comes to the methods you explained about smoother game play, i really dont have much to say though i can say about quake 3 that sometimes when you are having a time out or latency bigger than the one defined by the admin you get automatically kicked haha but well thats barely a command. Though a possible method would be Packet Buffering which would give a bit higher Ping but at least it would be stable possibly same for most players.. Such methods like packet buffering are used by ISPs which is the interleaved mode if i remember well, excuse me if i am mistaken been ages since i studied these stuff..

http://en.wikipedia.org/wiki/Interleaving

But of course even this wouldn't make a big difference in latencies because latencies vary from server location to client location or server bandwidth to client bandwidth, though with a similar method you could possibly stop players from WARPING around the map and rather make them look like they stand still, i have noticed this in most quake 3 oriented games.