How do you optimise UDP packet loss for a high-tickrate competitive shooter?
Answer
Short answer
Analyse approaches to mitigating packet loss in a fast-paced UDP environment, focusing on forward error correction and redundant data.
Operating a competitive tactical shooter at a 128Hz tickrate across hostile residential Wi-Fi networks guarantees 5% to 10% packet loss and vicious jitter. Maintaining pristine hit registration and fluid movement in this environment is a brutal exercise in mitigating unreliable networks. TCP is an immediate non-starter; its head-of-line blocking and retransmission algorithms generate latency spikes that destroy the player experience.
Treat this as a netcode problem before treating it as a generic networking problem. Good netcode decides which packets are state, which are events, and which can be dropped without harming the player experience. Weak netcode tries to make every UDP message reliable and recreates TCP badly. Strong netcode accepts loss, sends fresh state often, and designs correction so the game feels stable even when the network is not.
Was this answer helpful?
Likely follow-ups
- How would you size the FEC block length if packet loss occurs in bursts rather than uniformly at random?
- What changes in your redundancy strategy if players are on asymmetric connections with very different upload and download loss rates?
- How do you prevent a malicious client from exploiting the rollback and resimulation path to desync other players?
Related questions
- How do you design a global skill-based matchmaking system that prevents grandmasters from stomping novices without making them wait in a 20-minute queue?hardAlso on game-server3 min
- How do you optimise Java Virtual Machine (JVM) garbage collection to eliminate tail latency spikes in a game server?hardAlso on game-server3 min
- When would you choose deterministic lockstep over an authoritative server, and what does each model cost you?hardAlso on netcode5 min
- Walk me through what rollback netcode does on a single frame, and what it costs to run it.hardAlso on netcode5 min