ZAG

• Home • Edit


⚡ ZAG is a tap-to-turn arcade game where you zigzag your way forward.

Play

Play in your browser:

Or download for desktop:

How to Play

The ball rolls along a narrow path that zigzags, turning 90 degrees with each line. Tap, click, or press Space to turn.

Time your turn just right. Turn too early or too late, and the ball falls off.

Earn 1 point for each line you cross. The ball speeds up as you play and your high score is saved.

Controls

Turn with:

  • Tap or click
  • Space, Enter, or ↑
  • Gamepad A

Features

  • Procedurally generated paths: every run lays down a new staircase of straight segments.
  • Speed that ramps up: the ball starts at 4.5 units per second and gains speed with every point, up to a cap of 10.
  • Milestones: every 10 points, the backdrop walks to a new hue, the score pops taller, and a burst of particles celebrates the moment.
  • Animations: a trail behind the ball, squash-and-stretch on each turn, particle bursts for turning, scoring, and falling, and a camera shake when the ball leaves the path. Camera shake follows your system’s reduced motion setting.
  • Sound: sound effects for turning, scoring, falling, and game over. Plus, lofi music plays in the background.
  • Saves: your high score is saved to localStorage. On Wavedash, there are achievements, a high score leaderboard, and cloud saves.
  • Controls: mouse, touch, keyboard, and gamepad support.
  • Responsive: supports desktop and mobile browsers.

Credits

Background

I made ZAG for LittleJS Jam 3. The theme is ZIGZAG, and the rules require the game to be made with the LittleJS Engine and to be free to play in the browser.

I also participated in the Wavedash challenge by publishing the game on Wavedash and implementing three features with the SDK that LittleJS’s WavedashPlugin provides:

  1. leaderboards
  2. cloud saves
  3. achievements

On Wavedash, the game posts a high score to the high_score leaderboard. It also saves the high score to a cloud slot so the score follows the player across devices. And it reports the HIGH_SCORE and RUNS_PLAYED stats so achievements can be unlocked.

Check out the source code on GitHub or play the game.