What it does
The field is an offset hex grid hanging from a ceiling. Its trace moves a circle from the launcher at an angle, reflecting off the side walls, until it touches a bubble or the ceiling. Contact is exact, a ray against a circle rather than a stepped walk, so a well-aimed shot slips through a one-bubble gap as players expect. The shot snaps to the nearest empty cell, a group of three or more of a colour pops, and everything no longer connected to the ceiling or to a stone falls. You can use the field alone, for an editor, a hint system or a turn-based puzzle.
The session adds the arcade game around it. The launcher turns within a range at a set speed, or aims straight at a pointer. The loaded and next bubbles are dealt only from colours still on the board. A hurry countdown starts a few seconds after a bubble loads and then fires for you. The ceiling comes down after a number of shots that depends on how many colours remain, with a shake warning first. Rounds play in order or follow a branching route the player chooses, and a bubble resting over the line ends the round, with a continue countdown after it.
You call turn or aimAt, fire and tick, then read the state and drain the events: fire, bounce, stick,
pop, drop, press, hurry, clear and the rest. Bubble ids last a bubble's whole life, including the flying
shot, so one sprite per id never smears. Every colour comes from a seeded stream, so a session replays exactly.
Features
- Exact bank shots — a ray-against-circle trace that reflects off the side walls, with an adjustable contact width.
- Pop and drop — groups of a set size pop, and anything not hanging from the ceiling or a stone falls.
- Special cells — clear bubbles that never pop and only drop, fixed stones that anchor what hangs from them, and stars that pop every bubble of the colour that touches them.
- Ceiling modes — a press that lowers the ceiling a row, a push that brings a new row in from the top, or none.
- Arcade timers — the hurry countdown and auto-fire, reload time and a shake warning before each press.
- Scoring — points per pop, a drop score that doubles with every bubble (20, 40, 80 and on, up to 1,310,720), and a time bonus for a fast clear.
- Rounds and routes — round lists that can loop, or a branching route of stages, built by hand or with
pyramidRoute. - Rounds as text —
importRoundsreads rows of colour letters, with marks for clear bubbles, stars, stones and wider boards. - A demo player —
suggestreturns the best angle for the loaded bubble, for an aim hint, an attract mode or a computer opponent. - Difficulty and continues — easy, normal and arcade settings, an aiming guide line, and limited or unlimited continues.
- Snapshot and restore — for saves, replays and tests.
Good for
- Classic arcade bubble shooters, in the style of Puzzle Bobble or Bust-a-Move, with their rounds, timers and scoring.
- Casual mobile bubble shooters with level lists, a guide line and generous continues.
- Endless rising-row modes, where a new row of live colours arrives every few shots.
- Versus games, two sessions trading pops and drops as attacks.
- Level editors and hint tools, built on the field alone.
- Co-op variants, two launchers firing into one field.
Make it yours
Everything is configuration: the field's width and height, bubble size and row spacing, the row shape, the contact width, the group size that pops, the number of colours, the rounds and their widths, the route, the launcher's range and speeds, the hurry timer, the ceiling mode and schedule, the scoring, the time bonus, the guide and the continues.
Two presets of the same API follow the 1994 arcade game, with its 30 one-player rounds and pressing ceiling, and the 1995 sequel, with an alphabet tree of stages over 135 boards, stones, clear bubbles, stars and boards 17 bubbles wide. Each takes a difficulty, a start round, a seed, your own rounds and a number of continues.
Quite different games come from the same pack: the arcade preset played as it was; a twelve-wide field of full-width
rows with groups of four, four colours, rising rows and no hurry timer; or an endless mode with ceiling.mode set to
'push', where a new row is pushed in every few shots with the same shake warning.
A quick look
A session from the first preset, aimed, fired and stepped, with drops sent to the presenter:
const bs = game.bubbleshooter;
const pb = bs.createBubbleGame(bs.puzzleBobblePreset({ difficulty: 'normal' }));
pb.turn(-1); // hold left; or pb.aimAt(x, y) for a pointer
pb.fire();
const s = pb.tick(dt); // fixed 120 Hz steps inside; returns the state
for (const e of pb.drain()) if (e.kind === 'drop') fallingBubbles(e.cells);
Works with
versus-garbage— for two-player rules, where pops past three and dropped bubbles go to the other side.world-screenandrig-follow— to present the field.typographyandui— for the score, the round and the hurry countdown.audio— to quicken the music as the bubbles near the line, from the state's danger value.faller— for falling-piece games in a well;match3for swapping tiles on a square grid.
Good to know
- Rows are offset hex rows with the odd rows shifted; a pointy-top layout or a square grid is not supported.
- The trace reflects off the side walls only; the ceiling ends a shot, and a shot never travels down.
- Two-player play is not built in: run two sessions and exchange attacks with
versus-garbage. - Some arcade details are estimates, such as the tilt range, turn speed, shot speed and press base, and all of them are settings. A few rarer arcade features, such as a computer versus mode, are not included.
- Bubble ids restart when a session moves to a field of a different width, so a presenter should re-key its sprites at the start of a round.






