Phaser AE

Track racer

Pro packv3.0.0-32DArcade

The rules of top-down circuit racing on one screen, as a single deterministic session: the track select, the grid, laps and positions, computer drivers, wrenches and upgrades, hazards, crashes, bridges and weapons. Your game sends the steering and the pedal, and draws what the session reports.

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

Released October 14, 2026 · updated October 20, 2026

Track racer: 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

You create a race from a definition and step it with one input per seat: steering from full left to full right, the gas pedal, and the fire, missile and start buttons. Every car is a vehicle-handling car, so steering, grip, understeer, skids, spin-outs, surfaces and the response to every collision are that pack's; this one finds the contacts, picks the surface under each car and drives the inputs. Each step reports what happened as events (green, lap, finish, wrench, crash, helicopter, gate, jump, hit, upgrade and more) for your game to play sounds and effects from, and the state holds every car, pickup, hazard, shot and prop to draw.

The session is the whole game, not just the race. It runs the attract mode with a computer race, the starting-track select, the ready countdown and the flags, laps and in-order checkpoints, the results screen with its bonuses, the upgrade shop, qualification, continues and game over. Computer drivers plan their route through the road network, take an open shortcut on a roll of their skill, aim at the inside of the coming bend or out to pass, steer round hazards, lift off for a bend they cannot take flat, and aim back at the road when they get stuck.

Circuits can cross themselves. A track has levels, the ground and bridge decks above it, and a car changes level only inside a transition zone where roads of two levels meet. Position alone never moves a car between levels, so a car under a bridge stays on the ground even where it overlaps the deck on screen, and walls, hazards, pickups, shots and car-to-car collisions all respect the layer. The session is fixed-step, seeded and snapshot-able, so a restore repeats every random draw.

Features

  • Circuits as roads — roads between named nodes, each with a width, an optional curve, a level, a surface and a kind (road, ramp or gap), plus aprons, painted surfaces, solid and destructible blocks and timed gates.
  • Bridges and overpasses — ground and deck levels joined only through transition zones, with decks() and transitions() to draw the decks over the cars beneath them.
  • Computer drivers — four skill settings with pace, cornering, look-ahead, overtaking, shortcut taking, hazard avoidance and firing, faster every heat up to a cap, and an optional rubber band.
  • The full game loop — attract, select, grid, race, results, shop, continue and over phases, with joining, qualification and continues.
  • Wrenches and upgrades — pickups that buy upgrades in levels, each a change to grip, acceleration, top speed, score, missiles or shields.
  • Hazards — painted patches such as oil and water, roaming hazards such as tornadoes, and mines, laid by the difficulty setting and the heat.
  • Crashes and jumps — a hard wall hit explodes the car and a rescue helicopter brings it back; ramps launch fast cars and an open gap drops slow ones.
  • Weapons and scenery — cannons, missiles and shields, turrets, targets for points, and scenery that spills, falls or opens a shortcut when shot.
  • Two classic presets — eight circuits for four cars in the style of Super Sprint, and eight armed arenas for three cars in the style of Badlands, each with Easy, Normal and Arcade difficulty, plus a figure-of-eight bridge circuit.
  • Deterministic and snapshot-able — seeded, fixed-step and restorable mid-race.

Good for

  • Single-screen circuit racers with drones, wrenches and upgrades, in the style of Super Sprint or Championship Sprint.
  • Armed car racing, where cannons slow rivals and missiles blow them up, in the style of Badlands.
  • Off-road stadium racing with dirt and mud surfaces, ramps for the jumps and turbo in the shop.
  • Kart battle arenas, with weapons switched on and mines as a hazard.
  • Slot-car and toy-car tracks that cross over themselves, with a deck over the crossing.
  • Local multiplayer racing on one screen, with computer cars filling the seats nobody takes.

Make it yours

Each game is a definition, and the presets are definitions too. A circuit sets its roads, aprons, blocks, gates, props, timed scenery, checkpoints per lap, par times, grid slots and starting wrenches. The game sets the seats and cars, the vehicle in metres, extra surfaces, laps, how players qualify (beat every drone, or win), continues, the circuit order, scoring, wrenches, upgrades, hazards, crashes, jumps, weapons and what each difficulty means. The presets take their own options, such as laps, cars, seats, the circuits and their order, and whether drones fire.

The same session runs very different races. A four-car championship on the preset's eight circuits, four laps a race, with three wrenches buying an upgrade and every player having to beat every drone, is one configuration. A six-car race on an oval of your own size with eight checkpoints, a gated cut and win-only qualifying is another. The two presets' rules also mix: set weapons on the Super Sprint preset and its circuits are raced with guns.

A quick look

A race from the four-car preset, stepped with one input per seat:

const TR = game.trackRacer;
const g = TR.createTrackRacer(TR.superSprintPreset({ laps: 4 }), { difficulty: 'normal', seed: 1986 });
g.step([{ steer: -1, gas: true, start: true }]);   // one fixed step, one input per seat
for (const e of g.drain()) { /* green, lap, finish, wrench, crash, helicopter, gate, jump, hit … */ }
g.state;   // phase, cars, wrenches, hazards, shots, gates, props, results, shop …
const snap = g.snapshot(); g.restore(snap);

Works with

  • vehicle-handling — every car is one of its vehicles: grip, skids, surfaces, jumps, upgrades and collision response.
  • track and path — every road is an edge of a track network, authored in the path notation.
  • typography, audio and world-screen — to draw the race as 2D sprites, score it and sound it.
  • road-racer — for a pseudo-3D road seen from behind the car.
  • road-combat — for a vertically scrolling road with combat.

Good to know

  • One screen per circuit: there is no scrolling camera, though circuits may be any size and your game scales them.
  • Each car collides as two circles, and overlapping roads of the same level merge, so an overlap should be at least a car wide.
  • Drones do not use missiles, steer round hazards by lane only, and collect wrenches only when the definition allows.
  • Destructible blocks fall to missiles only; props fall to any shot.
  • The presets' speeds, drone skills and hazard timings are estimates tuned to match recorded play of the originals.

More Arcade packs

Show all →