When the Server Decides It's Not You — Understanding Desync in Online Games

You’re playing Pokémon Unite. Groudon’s HP is a sliver. You unleash from Left Team you use Greninja’s Unite move at the perfect moment, the animation lands, and your screen clearly shows Groudon ( i.e. objective) still alive when your hit connects. Yet, a second later, the enemy Espeon’s team gets the buff.
Heartbreaking? Yes. Unfair? Not exactly. This isn’t a bug — it’s how low-level systems in online multiplayer games work. Underneath that moment is a precise dance of client-server communication, latency compensation, and timestamp reconciliation that decides who actually landed the hit first.
Client–Server Reality
Modern multiplayer games rely on an authoritative server. Your client predicts what will happen, but the server decides what really did. Every action you take — shooting, casting, moving — is timestamped locally and sent to the server:
{ action: "Greninja_Unite", localTime: 10234 }Meanwhile, Espeon’s client might send:
{ action: "Espeon_Psychic", localTime: 10233 }
The key is that the server doesn’t just go by arrival order. Instead, it checks client timestamps to fairly reconstruct what each player saw on their own screen. This is called latency compensation — the art of making simultaneous events appear fair despite different ping times.
Ping and Timestamp Ordering

If your ping is 120 ms and Espeon’s is 35 ms, your packet takes longer to reach the server — but the server still considers when you acted, not just when the message arrived. It “rewinds” to determine which event happened first in client time.
Greninja (ping 120ms): acted at t=10.00, arrives at 10.12 Espeon (ping 35ms): acted at t=10.05, arrives at 10.085
Even though Espeon’s packet arrived sooner, the server sees that Greninja acted earlier (10.00 vs 10.05) and grants priority to that action. This balancing act — trusting timestamp windows but verifying plausibility — is what makes online games feel responsive and fair across wildly different network conditions.
Server Reconciliation and Prediction
Clients use prediction to make gameplay feel smooth, guessing outcomes before the server replies. When the real server state arrives, the client reconciles differences. This causes HP bars or positions to snap into place — those “rubberband” or “teleport” moments you sometimes notice.
Shooter Analogy — PUBG and Free Fire
The same applies to shooters. Suppose in PUBG or Garena Free Fire you and an opponent fire simultaneously:
Player A (ping 120ms): fires at t=10.00 Player B (ping 35ms): fires at t=10.05
The server receives B’s packet first — but A’s local timestamp is older. The server “rewinds” to verify both perspectives and concludes A’s shot happened first, even if A’s packet arrived late. That’s why players sometimes die even though they “saw” themselves fire first.
This trade-off between fairness and perception is core to lag compensation. It prevents low-ping players from always winning due to timing bias but introduces those confusing “I hit first!” moments.

When Hackers Exploit Timing
Because servers partially trust client timestamps and positions, hackers abuse this layer of fairness. They modify or forge packets to gain unfair advantages:
- Timestamp spoofing: faking earlier action times to make shots or hits register before they should.
- Position desync: sending a delayed “behind cover” position even though they were exposed in reality.
- Aim and recoil injection: altering camera or bullet data before serialization.
These are called lag compensation abuses or client-side prediction exploits. To combat them, modern anti-cheats limit how much timestamp skew is trusted, enforcemaximum rewind windows, and apply heuristic consistency checks across packets.
Core CS Concepts Behind It
- Lamport timestamps: ordering distributed events without a global clock.
- Eventual consistency: clients converge on the server’s truth after delay.
- Clock drift correction: syncing device timers to a shared logical time base.
- Tick rate and sampling: how often the server processes world updates (30–128Hz affects fairness granularity).
- Trust boundary validation: how much a server believes client-reported timestamps or inputs.
Fairness vs Perception
Servers favor logical fairness (what truly happened in global time) over visual fairness (what you saw). Without that, everyone would see themselves as the winner. But that same mechanism — timestamp trust — is what can be turned against the game through hacks.
“It looked perfect on my screen… but the server decided it wasn’t me.”
Conclusion
Desync isn’t a flaw; it’s physics and computer science colliding with human perception. Every match is a distributed system fighting entropy — where each packet carries your intent, timestamped in hope the server agrees. Whether it’s Groudon’s buff or a headshot, the final call is made not by your reflexes alone, but by distributed consensus under latency.