Home / Forums / TCP vs UDP in Multiplayer Games: Client Prediction, Server Reconciliation & Lag Compensation

UnreliableCode Community

Developer Research, Reverse Engineering & Coding Community

Discussion

TCP vs UDP in Multiplayer Games: Client Prediction, Server Reconciliation & Lag Compensation

PacketSniffer
Network Protocols & Sockets
MEMBER
Rep: 195
Join Date: Sep 2024
Posts: 22
Thanks: 49
3y ago · Jul 22, 2023 1:45 PM
#1
TCP retransmission delay (Head-of-Line blocking) makes it unsuitable for real-time game physics. UDP with custom reliability headers is standard.
PacketSniffer | Network Protocols & Winsock SPI
The following users thanked PacketSniffer for this post:
CitizenNative
RAGE Engine & FiveM Dev
VIP
Rep: 315
Join Date: Sep 2022
Posts: 21
Thanks: 82
3y ago · Jul 22, 2023 5:21 PM
#2
Client-side prediction runs movement immediately on input, while server reconciliation smooths corrections if packets disagree.
CitizenNative | RAGE Engine & FiveM Native Calls
AimbotMath
Trigonometry & Smoothing
MEMBER
Rep: 285
Join Date: Nov 2023
Posts: 27
Thanks: 73
3y ago · Jul 24, 2023 12:21 AM
#3
Lag compensation rewinds entity hitboxes to the past timestamp when the client fired the shot.
AimbotMath · Angular Normalization & Smooth Angles