Zigzag Turn Timing: How the Engine Judges Every Tap

A tap in Zigzag does not move the ball and does not score. The engine records your direction and judges it exactly once, at the moment the ball reaches the next tile center. Understanding that single judgment removes most wrong taps.

The judgment rule

The ball walks from tile center to tile center at a fixed speed. When it arrives, moveToNextTile compares your current direction against the stored direction for that step of the path. A match advances you one tile and one score. A mismatch calls the game over routine immediately, with no grace window and no undo.

Between arrivals, your direction is just a state. Nothing checks it mid tile. You can toggle twice, three times, or hold a wrong direction for most of a tile, and the run survives if your direction is correct at the arrival frame.

Tap mechanics

Touch input and the space bar toggle between left and right. Every tap is relative, so a panic double tap cancels itself out.

The arrow keys and A and D set direction absolutely. The engine ignores ArrowLeft when you already face left, and ArrowRight when you already face right. On a keyboard, pressing the key that matches the required side can never flip you twice, which removes the double tap failure mode entirely.

Speed curve and your reaction budget

Speed starts at 120 pixels per second. Each scored tile feeds a multiplier of 1 plus score over 300, capped at 3.5. One tile step covers the isometric diagonal of a 64 by 36 diamond, about 36.7 pixels.

That arithmetic gives a concrete reaction budget per tile.

1. Score 0, multiplier 1.0, speed 120: 0.306 seconds per tile.

2. Score 150, multiplier 1.5, speed 180: 0.204 seconds.

3. Score 300, multiplier 2.0, speed 240: 0.153 seconds.

4. Score 600, multiplier 3.0, speed 360: 0.102 seconds.

5. Score 750 and above, multiplier 3.5, speed 420: 0.087 seconds, the floor.

The HUD prints the multiplier once it passes 1.2, which happens at score 60. A success chime and screen flash fire every 10 tiles, and a combo popup every 5, so the game hands you a free pace check twice per decade of score.

Reading the path

The path generator picks left or right with a 50 percent coin flip per tile, so no pattern bias exists to exploit. The engine builds 80 tiles ahead at start and appends 40 more whenever fewer than 30 remain, so the path never runs dry ahead of you.

The rendering states the answer one tile early. The next tile carries a white dot offset to the side you must face when you arrive, 8 pixels right or 8 pixels left of the tile center. The current tile renders brightest with a glow, past tiles darken, and the camera eases toward the ball with a lerp of 4 times the frame time.

Timing routine

1. Watch the dot on the next tile, never the ball. The dot is the requirement, stated one full tile before the judgment.

2. Decide while the ball crosses the current tile. At score 300 you have 0.153 seconds, which fits one decision and one tap and nothing else.

3. Tap once, early in the tile, when the dot side differs from your facing. Early taps match last frame taps in outcome, because only the arrival state counts.

4. On a keyboard, press the arrow key that matches the dot side instead of toggling. Absolute input cannot double fire.

5. Count tiles in beats of 5, matching the combo popups. When your beat drifts, reset your tap rhythm on purpose, because the coin flips cannot be predicted.

6. At multiplier 3 and above, stop reading the far path. React only to the next dot, one tile deep.

Where this implementation hurts you

The judgment frame is exact. A correct direction set one frame late is a loss, and the engine offers no undo, no checkpoint, and no revive.

Toggle input punishes double taps asymmetrically. Two quick taps while facing the wrong way leave you wrong at arrival, where a single tap would have been right. This is the most common self inflicted death above multiplier 2.

The frame time clamp of 0.1 seconds means devices running below 10 frames per second slow the game down rather than skipping physics. The ball crawls, and a rhythm trained on a smooth device stops applying. Your best score persists only in browser localStorage under the key zigzag_best, so clearing site data for the domain erases the record.

Zigzag run checklist

  • [ ] Eyes on the next tile dot, ball in peripheral vision.
  • [ ] One decision and one tap per tile.
  • [ ] Arrow keys used on desktop for absolute direction.
  • [ ] Beat anchored to the 5 tile combo popups.
  • [ ] At multiplier 3, attention narrowed to a single tile.

Play the [Zigzag game](/en/zigzag) with the speed table beside you. If your personal collapse point matches one of the multiplier checkpoints, note the score where runs end. Collapse scores are the most useful data you can contribute.