Back to Blog
netcodemultiplayerlatencymechanics

Your Netcode Is a Design Constraint: Picking Mechanics That Survive Online Play

Latency is not a bug your programmers will fix later. Budget the delay, pick an authority model, and specify timing windows and arbitration before you build the ability.

GameDesignerX TeamNovember 23, 20267 min read

Your parry window is three frames. At 60 frames per second that is 50 milliseconds, and in local playtests it feels superb — tight, skillful, the thing reviewers will call "crunchy". Then you turn on online play, two testers connect from different cities, and the parry stops working. Not always. Just often enough that both players are certain the other one is cheating.

Nothing is broken. The mechanic was specified in a world where input, simulation and feedback all happen on one machine. Online, they happen on three different clocks. Latency is not a bug the programmers will fix later; it is a design constraint that belongs in your mechanics doc next to damage values and cooldowns.

Here is how to budget for it before you build the ability.

The three numbers you need first

Before you design a single online mechanic, get these from whoever owns your networking:

Round-trip time (RTT). How long a packet takes to go to the server and back. Design for a range, not a best case: same-city play is cheap, same-region play is comfortable, cross-continent play is expensive, and mobile networks are unpredictable regardless of distance. Pick a target band — say "playable to 150 ms RTT, fair to 250 ms" — and write it down as a design target.

Tick rate. How often the authoritative simulation advances. A 60 Hz server resolves at 16.7 ms granularity; a 20 Hz server resolves at 50 ms. Your three-frame parry does not exist on a 20 Hz server — it falls between ticks.

Interpolation buffer. Clients deliberately render remote players slightly in the past to smooth out jitter. Two ticks of buffer at 30 Hz is another 66 ms of delay before you see an opponent's action.

Add them up for the worst case you intend to support:

Component Example value
One-way trip to server 60 ms
Server tick granularity (30 Hz) up to 33 ms
Interpolation buffer (2 ticks) 66 ms
Client render + display 30 ms
Total opponent-action-to-your-screen ~190 ms

That total is your real reaction budget. If a mechanic demands a human response faster than it, the mechanic is not hard — it is random.

Who owns the truth

Every online mechanic answers one question: when two machines disagree, who wins? The answer shapes what you are allowed to design.

Server authoritative, no prediction. The client sends input, waits, and renders what comes back. Honest and cheap to secure, but every action feels sticky. Fine for turn-based games, card games, builders and anything where you tap a button and wait for a result anyway.

Client prediction with reconciliation. The client simulates your own actions immediately and corrects when the server disagrees. This is the standard for shooters and action games. It makes your movement feel instant and leaves other players in the past — which is why your own actions should be predictable from local input alone, and interactions between two players should not be.

Deterministic lockstep. Everyone simulates everything and only inputs are sent. Cheap on bandwidth, which is why strategy games with hundreds of units use it, but it stalls when one player's packets are late, and any floating-point divergence desynchronises the match.

Rollback. The client predicts the opponent's input, then rewinds and re-simulates when the real input arrives. It is why modern fighting games can keep tight timing windows online. It demands a compact game state you can save and restore many times per second, which is an architecture decision, not a feature you add in month eleven.

Prediction-friendly versus prediction-hostile mechanics

The useful split is not "fast versus slow". It is whether the outcome can be computed from one player's local inputs.

Prediction-friendly:

  • Movement, jumps, dashes driven by your own stick and buttons
  • Casting, reloading, charging — anything with a windup you own
  • Hitscan weapons resolved server-side with lag compensation
  • Cooldowns, resource spend, inventory changes

Prediction-hostile:

  • Parries, counters and reactive blocks keyed to another player's animation
  • Grabs, throws, shoves and collision-based pushing between players
  • Tug-of-war contests where both players mash against each other
  • Precise simultaneity: two players standing on a pressure plate on the same frame
  • Fast-moving physics objects that both players can bat around

You do not have to delete prediction-hostile mechanics. You have to re-specify them so a disagreement has a defined, non-humiliating outcome.

A tolerance table for your mechanics doc

Put a latency column in the mechanics table you already keep. This is a starting template, with the mitigation that usually saves the design:

Mechanic Reaction demanded Online risk Mitigation
Dodge roll with i-frames 150–250 ms Low (self-predicted) Grant i-frames on the client's own timeline
Parry window 50–100 ms High Widen to 200 ms online, or go rollback
Melee grab Contact frame High Make it a request; server arbitrates, loser plays a break animation
Hitscan shot None Medium Lag compensation: rewind target hitboxes to shooter's time
Slow projectile None Low Spawn locally as cosmetic, authoritative copy resolves damage
Shared pressure plate Simultaneous High Give it a 500 ms "both within window" grace period
Loot pickup race Simultaneous Medium Instanced loot, or first-come with a visible claim state

The pattern across that column: replace a knife-edge with a window, and replace a contest with an arbitration.

Rewriting one mechanic, concretely

Original spec: Parry. 3-frame window on block press. Perfect parry stuns the attacker for 1.2 s.

Online-safe spec:

  • Window: 12 frames (200 ms) when the match RTT exceeds 80 ms, 6 frames below that. The window is a tuned value, not a constant.
  • Trigger: measured against the attack's locally visible animation start, so the player is judged on what they actually saw.
  • Client response: play the parry spark and freeze your own character immediately — cosmetic only.
  • Authority: server confirms within two ticks. On confirmation, apply the 1.2 s stun. On rejection, cancel to a normal block with 15% chip damage, never to a hitstun state.
  • Rule: a rejected parry may downgrade the player's outcome, but may never teleport them or hand the opponent a kill they did not earn locally.

That last line is the design principle worth stealing. Mispredictions are inevitable; make them cost a little, not everything.

Test it with a lag simulator, not hope

Build the lag dial into your debug menu in week one, next to the other cheats you already keep. Then run every online playtest at four settings:

  1. 0 ms, 0% loss — the baseline where it was designed
  2. 60 ms RTT, 20 ms jitter — a good regional connection
  3. 150 ms RTT, 40 ms jitter, 1% packet loss — a bad but common one
  4. 250 ms RTT, 2% loss — your stated floor

Checklist before a mechanic ships online

  • Reaction demand is larger than the total opponent-action-to-screen budget
  • The outcome is computable from one player's inputs, or explicitly arbitrated
  • A mispredicted result degrades gracefully, with no teleports or unearned deaths
  • Timing windows are data-driven and can scale with measured RTT
  • It survived a 150 ms playtest with real humans, not just a bot
  • Rejections are logged with RTT so you can find the mechanics that misfire most

If you keep your systems in GameDesignerX, the mechanics module is the right home for the latency column and the arbitration rule, and "we design knife-edge timing before choosing an authority model" is exactly the kind of entry the risk log exists to catch early.

Online play does not make your game feel worse by itself. Specifying mechanics as if the network were free does that. Decide the authority model, write down the budget, then design to it — and your parry will work in both cities.