Netcode

Netcode is a blanket term most commonly used by gamers relating to networking in online games, often referring to synchronization issues between clients and servers.

Common causes of such issues include high latency between server and client, packet loss, network congestion, and external factors independent to network quality such as frame rendering time or inconsistent frame rates.

This occurs because a delay-based netcode does not allow the simulation to continue until it receives the inputs from all the players in the frame in question.

Rollback is quite effective at concealing lag spikes or other issues related to inconsistencies in the users' connections, as predictions are often correct and players do not even notice.

Nevertheless, this system can be troublesome whenever a client's game slows down (usually due to overheating), since rift problems can be caused leading to an exchange of tickets between machines at unequal rates.

[6] To address this uneven input flow (and consequently, an uneven frame flow as well), there are standard solutions such as waiting for the late entries to arrive to all machines (similar to the delay-based netcode model) or more ingenious[citation needed] solutions as the one currently used in Skullgirls, which consists of the systematic omission of one frame every seven so that when the game encounters the problem in question it can recover the skipped frames in order to gradually synchronize the instances of the games on the various machines.

[8] Although this system is often associated with a peer-to-peer architecture and fighting games, there are forms of rollback networking that are also commonly used in client-server architectures (for instance, aggressive schedulers found in database management systems include rollback functionality) and in other video game genres.

[11][17] A game's choice of transport layer protocol (and its management and coding) can also affect perceived networking issues.

These connections, however, are not quite suited to the network speeds that fast-action games require, as this type of protocol (Real Time Streaming Protocols) automatically groups data into packets (which will not be sent until a certain volume of information is reached, unless this algorithm — Nagle's algorithm — is disabled) which will be sent through the connection established between the machines, rather than directly (sacrificing speed for security).

This protocol is much simpler than the previous one, but it lacks its reliability and stability and requires the implementation of own code to handle indispensable functions for the communication between machines that are handled by TCP (such as data division through packets, automatic packet loss detection, etc.

Diagram on the execution and synchronization of the inputs of two players (with a 90 ms ping between them) in an online game that uses delay-based netcode in a peer-to-peer model.
Diagram on the execution and synchronization of the inputs of two players (with a 90 ms ping between them) in an online game that uses rollback netcode in a peer-to-peer model.