Phaser AE

Traffic release puzzles

Pro packv3.0.0-3Grid

The rules of tap-to-release puzzles: tap a car or a block and it leaves along its route, but only if that route is clear right now. Flat road grids and 3D voxel stacks are the same rules, and a seeded generator makes levels screened for how tangled they are.

This is a Pro pack. Upgrade to Phaser Pro to use it in your games.See Phaser Pro →

Released October 14, 2026 · updated October 19, 2026

Traffic release puzzles: a screenshot of its demo
A note about these graphics

Expansion packs don't come with graphics. This screenshot is one way of drawing what the pack does, made for its demo: none of the sprites, tiles or backgrounds in it are in the pack.

That's by design. A pack is a game's logic, mechanics and effects, and it works with whatever art you give it. Some packs draw effects, backdrops or 3D scenes of their own, but none carries a game's sprites.

So the look is yours. Make the art on phaser.io, bring your own, or let your agent draw it in code: the same pack can look like anything.

What it does

A level is a board of cells, flat or with depth, holding pieces, walls and hazards. Each piece has one or more routes off the board, written as a list of footprints, so a car can drive straight out or pivot round a corner. Tapping a piece asks for a release along one of its routes, and it is granted only when every cell the route sweeps is free of parked pieces, walls, the paths reserved by pieces already on their way out, and any hazard at the tick it would pass. A refused tap returns its reason, such as blocked, reserved-lane or hazard, and with a mistake limit set it counts against the player.

Released pieces move on ticks, one footprint at a time, and reserve their whole route until they are off the board, so pieces whose routes do not meet can move together while crossing paths wait. inspect lists everything in a route's way and every cell it sweeps, which is exactly what a presenter needs to highlight a blocked path or flash the culprit. Periodic hazards, such as a pedestrian on a kerb, close a route for some ticks in each cycle.

Hints are exact and cheap. A piece that has left never blocks anything again, so releasing any clear piece can never spoil the puzzle, and the solver simply plays the first clear release each time. The generator fills a shape with pieces, finds an order in which they can all leave, keeps one route per piece, replays the solution, and draws candidates until one has few enough open routes at the start and a long enough chain of blockers.

Features

  • Route clearance — a release needs its whole sweep clear of pieces, walls, reserved paths and hazards, with the corner of a turn included.
  • Flat or 3D — the same rules on a road grid and in a voxel stack up to 24 cells on each axis.
  • Ticks and reservations — released pieces move a footprint a tick and lock their route until they are gone.
  • Hazards — periodic obstacles, such as a pedestrian, that close a route for some ticks in each cycle.
  • Mistake limit — optional; a blocked tap counts, the level is lost at the limit, and undo gives a mistake back.
  • Inspection — inspect names every blocker by route step and lists every swept cell, for highlights.
  • Seeded generator — street, voxel and walled parking-lot presets, with rectangle, courtyard and staggered flat layouts and cube, pyramid, arch and diamond volumes.
  • Screened difficulty — tiers limit how many routes start open and require a minimum blocking chain, and the results are measured.
  • Exact hints — greedy play is provably enough, and solve never changes the puzzle.
  • Worker generation and undo — generateTrafficReleaseAsync runs off the main thread; undo, redo and reset are built in.

Good for

  • 3D arrow-block puzzles in the style of Tap Away, where cubes slide out of a stack along their arrows.
  • Traffic escape puzzles on a road grid, with cars that turn corners and pedestrians to wait for, in the style of Traffic Escape.
  • Car-park and arrow puzzles where every piece leaves whole in one go.
  • Timed crossings, using ticks and hazards to make the player choose when as well as what.
  • Mistake-limited challenge levels, with a set number of wrong taps allowed.
  • The release half of a bigger game, such as a lot of buses that leave to collect matching passengers.

Make it yours

A level is a TrafficConfig: the board's width, height and depth, up to 256 pieces with their cells and routes, walls, hazards with their phases, and the mistake limit. straightTrafficRoute builds a straight route off any edge for you; corner turns are footprints you author. Pieces carry an optional key for the presenter, such as a colour.

The generator takes a seed, a preset, a difficulty, a layout, a size, a density, whether to add the pedestrian hazard, a mistake limit, and overrides for the open-route and blocking-chain targets. Three materially different uses:

  • A 3D tap-away stack: the voxels preset as a size-five pyramid at very hard, with at most two routes open at the start.
  • A street puzzle: the streets preset on a courtyard layout with the pedestrian hazard and three mistakes allowed.
  • A hand-authored car park with a few walls, turning routes you draw frame by frame and a train that crosses the exit every few ticks.

A quick look

Generate a voxel level, release a piece and tick it off the board:

import { createTrafficRelease, generateTrafficRelease } from '@phaser-ae/traffic-release';

const level = generateTrafficRelease({ seed: 29, preset: 'voxels', difficulty: 'hard', layout: 'pyramid' });
const puzzle = createTrafficRelease(level.config, level.solution);
const piece = level.config.pieces[0]!, route = piece.routes[0]!.id;
const r = puzzle.apply({ type: 'release', id: piece.id, route });
if (!r.valid) shake(piece.id, r.reason);              // 'blocked', 'reserved-lane', 'hazard', …
while (puzzle.state.moving.length)
    for (const e of puzzle.apply({ type: 'tick' }).events) present(e);
const hint = puzzle.solve();

Works with

  • boarding-queue — uses these rules for a lot of vehicles that leave to collect matching passengers.
  • sliding-blocks — for cars that slide back and forth to make room before they leave.
  • world-3d and render-3d — to present the voxel stack or the streets in 3D.

Good to know

  • A reserved route stays locked until its piece has left, so two pieces whose paths cross never move at once, even when their timing would allow it.
  • The challenge is reading which piece is free, not planning: no move can trap the player. For puzzles where a move can, use sliding-blocks.
  • The generator's flat boards are square and at most 12 cells, its volumes at most 6, with six colours, single-cell cars on turning routes and one fixed pedestrian hazard; anything else is authored as a config.
  • The parking preset builds a walled lot of cars that leave either way along their axis, with no repositioning, and is not screened for difficulty.
  • Generated metrics describe structure, not a shortest plan or a human difficulty.

More Grid packs

Show all →