Phaser AE

Glass corridor

Pro packv3.0.0-13DArcade

A first-person throwing run on real rigid bodies: the launcher travels down a corridor, glass stands in the way, and every ball is ammunition you can lose or win back. A seeded generator builds the levels and plays each one through the physics, so every seed you ship is known to be beatable.

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

Released October 19, 2026

Glass corridor: 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 round is a corridor of pieces, each a rigid body in its own physics-3d world. The launcher moves forward at the travel speed while you throw balls ahead with fire. A piece hit hard enough for its material breaks and shatters into fragments; a piece still standing in the launcher's path when it arrives costs balls. Shooting a crystal earns balls. Run out and the round is lost; reach the end and it is won, scored by the material of every piece destroyed and rated from one to three stars: three with nothing run into and the balls back to where they began, two with nothing run into, one otherwise.

The pack runs the rules and the physics and draws nothing. state.poses gives every body's place, debris included, for your renderer, and state.progress says how far the launcher has come, so your camera follows it. aimAt turns a point ahead into the straight throw, trajectory previews a throw's flight, and hint suggests a throw at the nearest piece ahead.

The generator is what saves the most work. generateCorridor builds a level from rooms of six families, mixes them, and then plays the level through the physics to find a winning sequence of throws. The level comes back with that solution, its normalised parameters and its metrics, and the same parameters always give the same level.

Features

  • Real rigid bodies — every piece is simulated in a physics-3d world, whose runtime ships with the pack, and breaks into debris when hit faster than its material's strength.
  • Ammunition as the score — a piece run into costs balls, a reward piece shot pays them, and the round is lost when they run out.
  • Swinging obstacles — a piece with motion swings on a sine wave along x or y as a kinematic body, with its own amplitude, speed and phase.
  • Materials as data — glass, wood, stone, crystal and a goal sphere built in, each with a strength, mass, score and shape, and your own table merged over them.
  • Six room families — galleries of wide panes, sliding shutters, lattices of small panes, slaloms to weave between, vaults with a swinging beam and pillar, and gauntlets of swinging gates.
  • Proven levels — the generator replays a winning sequence of throws through the physics before it returns a level, and the solution comes with it.
  • Difficulty that means something — harder levels add rooms, swing the panes faster, raise the cost of a collision and speed up the travel.
  • Aiming helpers — a straight throw at a point, a flight preview and a hint at the nearest piece ahead.

Good for

  • First-person glass-breaking rail games, in the style of Smash Hit.
  • Tunnel runs with targets, where the player throws or shoots ahead while the camera moves on rails.
  • Endless or daily runs, since a seed and a difficulty give a level that is proved winnable.
  • Physics toys and destruction showcases, with materials that break at different impact speeds.
  • Touch games where a tap aims a throw at a point ahead.

Make it yours

A round is its configuration: up to 160 pieces with their positions, sizes and materials, an optional swing on each, the starting balls, the throw speed, gravity, the travel speed, where the corridor ends, the balls lost per collision, the balls gained per reward, and which materials count as rewards. Rooms are passed through for your presenter and the rules ignore them, so the corridor can look like anything.

Two very different uses: hand-author a short, slow corridor of stone and wood with gravity on, where every throw arcs and stone needs a much harder hit than glass; or let the generator build an endless run of gauntlet and vault rooms at hard difficulty, with fast travel, quick-swinging gates and expensive collisions. You can also give the rewards to a material of your own, so a gold block pays instead of a crystal.

A quick look

Generate a proven level, start a round on it, throw at a tapped point and follow the launcher with the camera:

const level = await game.glassCorridor.generateCorridor({ seed: 29 });
const run = await game.glassCorridor.createGlassCorridor(level.config);
if (tapped) run.fire(run.aimAt(pointAhead));
run.step(dt);
camera.z = run.state.progress;

Works with

  • physics-3d — the rigid world each round owns; reach for it alone for physics of your own.
  • slingshot-siege — sling shots at structures that collapse, on the same breakable materials.

Good to know

  • The pack draws nothing: your game renders the poses and the corridor.
  • Running into a piece is judged by whether it overlaps the launcher's path, not by the physics.
  • There is no undo; a round is paused or reset.
  • The generator builds 1 to 8 rooms and searches at most 30 candidates; if none can be proved, it throws rather than hand you an unwinnable level. Its proof is one winning run, not the fewest throws.
  • Each round owns a physics world: await its creation and dispose() it when finished.

More Arcade packs

Show all →