Practical construction.
WHAT PROTOCOLS ARE USED
A connectionless datagram protocol, for most game traffic A reliable stream protocol, for non-time-critical data
WHY DATAGRAMS DOMINATE
Reliable ordering causes delay when a packet is lost, which matters more than the loss.
WHAT MUST BE BUILT ON TOP
Selective reliability for messages that require it Ordering where needed Connection management
WHAT ENGINE NETWORKING PROVIDES
Much of this, with replication of properties and remote calls.
WHAT TO USE
The engine's system, unless you have a specific reason otherwise.
WHY
Building networking from scratch is substantial and error-prone.
WHAT TO TEST WITH
Simulated latency, packet loss and jitter.
WHY
Local testing has none of these, and every problem appears only with them.
WHAT TO SIMULATE
Conditions your actual players experience.
WHAT TO TEST DELIBERATELY
Disconnection at every point Reconnection Messages arriving out of order Duplicate messages
WHAT TO BE CAREFUL WITH
Sending large messages, which fragment Sending every frame, which floods Trusting message contents
WHAT TO MEASURE
Bandwidth, round trip time, and packet loss, per player.