From Shoryuken Wiki!
Revision as of 19:42, 10 September 2018 by Evilagram (Talk | contribs)

Jump to: navigation, search

Netcode refers to the code that relays the state of the game from one player to another in online play. There are two basic categories of netcode, delay-based and rollback. Rollback has been the standard in First Person Shooter netplay since Quake 3.

Delay-based netcode requires that both participants wait for the input of the other before the game state can be advanced, thus there is a delay put in place to ensure that the inputs have arrived before updating the game state. Lag in a delay-based netcode game looks like dramatic slowdown usually.

Rollback netcode does not wait for input from both users before updating the game state, rather both players run simulations of the game state simultaneously. Inputs are marked with the time at which they occurred, and whenever input is received, the simulation will roll back to when it occurred, and resimulate everything up to the present to determine the current game state. This means that rollback netcode does not slow down during more lag, but rather characters tend to teleport around as inputs are received late. Rollback netcode can also cause hits to be undone as newer inputs are received, and it's determined what actually should have happened. Rollback netcode keeps the timing of moves consistent during combos, and allows you to set your own delay to create a smoother experience on your side.

Many (Japanese) fighting game developers prefer delay-based netcode over rollback netcode, as it is simpler to implement, uses less bandwidth, and it avoids awkward teleporting. Delay based netcode encounters more problems with connections over long distances where more lag will be involved, such as in the United States or Cross-Country.

If the states of players on both sides do not match, this will cause a desync, meaning that both players will see different things happening on their screens. Once a game has desynchronized, it cannot be resynced and it may result in errors such as both players winning simultaneously.

Most fighting games use delay-based netcode, those with rollback netcode include:

  • Fightcade
  • Street Fighter II: HDR
  • Street Fighter III: Online Edition
  • Street Fighter V
  • Skullgirls
  • Killer Instinct
  • Pocket Rumble
  • Divekick
  • Melty Blood Actress Again Current Code with CCCaster
  • Marvel vs Capcom: Infinite
  • Mortal Kombat X