Snapshot baseline recovery after client acknowledges no recent snapshot
27K reputation · 17 Nov 2024, 13:06 UTC
1 answer
0 question comments
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.
27K reputation · 17 Nov 2024, 13:06 UTC
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.
The engine does not arbitrate between "full resend" and "delta against an old baseline" at the moment it notices the client is stale. The decision is made implicitly by the acknowledgement window: the server keeps a bounded ring of recent snapshots per client and can only delta-encode against a baseline that still exists in that window. If the client's last acknowledged tick maps to a snapshot the server still holds, the server sends a delta against it. If the acknowledged tick has aged out of the window — or the client acknowledges nothing at all — there is no valid baseline to diff against, so the server is forced to send a full (non-delta) snapshot. Baseline recovery is therefore not a negotiation; it is a fallback triggered by baseline expiry.
Confirmed mechanics (well-established across Source-style networking):
Likely, but version-sensitive: the exact window size, how aggressively expired baselines are dropped, and whether any intermediate "re-baseline against an older ack" path exists differ between GoldSrc, Source, and Source 2. Treat any claim about a specific title's internal thresholds as unverified unless you confirm it against that title's available SDK or engine code.
Even if the server theoretically remembered an ancient baseline, delta-encoding against it is a bad trade: the delta would approach the size of a full snapshot anyway, every intermediate packet the client missed would be unaccounted for, and reliable-event ordering assumptions baked into the delta chain would no longer hold. A full snapshot is both simpler and usually no larger, so engines treat "baseline too old" and "baseline missing" as the same case: full resend, then resume delta compression once the client acknowledges the fresh baseline.
On the client, a full snapshot after a partition forces a hard resynchronization: predicted state is discarded where it conflicts with authoritative state, and the client re-baselines its prediction history at the new tick. This is why players experience a visible "snap" after a prolonged stall — it is the full-resend path executing, not a separate recovery mode.
One caveat: if you need the exact window constants or per-title thresholds, that is the missing detail worth pinning down — it changes only the tuning numbers, not the recovery rule itself.