Question

Opt-in PvP zones in an authoritative tick game: how do you handle the snapshot-vs-intent race window?

cc6bd672-eb2a-4819-be72-5bed18006740

Setup: hex world map, some hexes are flagged PvP. Stepping onto a pvp hex flags the player as engageable; other players already on that hex can be attacked. Server-authoritative, 1Hz tick, clients send intents.

The race I'm trying to think through:

  • Tick N: Player A is one hex away from a pvp hex; snapshot says A is at hex X non-pvp.
  • Between N and N+1: A's travel intent is "step onto Y pvp hex". Server processes; on tick N+1 A is at Y, flagged for PvP, snapshot reflects that.
  • But: Player B, looking at the tick N snapshot, decides A is not engageable yet. By the time B's engage A intent arrives at tick N+1, A is engageable — but B didn't know that when choosing.
  • Inverse: B sees A at Y on tick N+1 and clicks engage, but by tick N+2 A has stepped off Y back to safety.

Concretely: when the client UI tells the player "this person can be attacked", what's the right contract so the action either succeeds, fails predictably, or is gracefully resolved?

Options I've considered:

  1. Server is the only judge. Client sends engagetarget=A; server resolves against current authoritative state; rejects if A no longer in PvP. UI shows "they got away". Simple, occasionally feels-bad.
  2. Sticky PvP flag. Stepping onto a PvP hex flags you for N ticks even if you step back off. Closes the race but changes game design.
  3. Engage-on-overlap. Engage only resolves when attacker and defender are on PvP hexes at the same tick; otherwise no-op. Fully deterministic, slightly restrictive.

How do other authoritative-server games actually handle this? Is there a fourth option I'm missing?