What it does
The pack is built in layers, and each one stands on its own. The bomb field takes bombs on an arena and runs them:
fuses and remote triggers, a centre and four blast arms that stop at hard blocks and burn the first soft block, chain
reactions in a fixed order (in the same frame, or rippled with a delay), items hidden under soft blocks that appear once
the block has burnt, kicked bombs that slide and punched bombs that fly, bounce and wrap through the border. You tick it
and drain a list of events, exploded, soft-hit, revealed, kicked and the rest, for your game to present.
The danger map is the idea that makes the rest work. For every tile it gives the seconds until it next burns, with chains resolved in fuse order, and it can add a hypothetical bomb to ask "what if I put one here?". The bomber bot plans on it: it flees to the best refuge when threatened, places a bomb only when a refuge stays reachable afterwards, and otherwise collects items, walks to a goal, hunts or digs where a blast burns the most soft blocks. It scores how few safe tiles an opponent could still reach and favours the bomb that leaves none. Measured headless, an Arcade or Normal bot alone with an idle opponent digs to it and kills it in each of four seeds without blowing itself up.
On top sits the rules owner, createBomberGame. Bombers take the same intent from a player or a bot, power-ups
change their loadout, monsters with small data-driven brains wander, chase and evade, and the game runs either a
campaign of stages or a match of rounds. Movement uses the grid-walker walker with the genre's control feel: a
bomber moves only while a direction is held and slides round a corner onto the open lane.
Features
- A complete bomb field — fuses, remote bombs, piercing blasts, chain reactions in placement order, hidden items, kicks, punches with bounce and wrap, and pressure blocks that crush a tile.
- Danger maps — when each tile will next burn and stop burning, with hypothetical bombs, and helpers for "is this tile safe from now until then?".
- Bots at three levels — Easy, Normal and Arcade profiles with reaction time, aggression, trapping, hunting, item greed and mistakes, playing any arena the pack can build.
- Monsters as data — each kind has a score, speed, wall-passing, bomb-passing and a brain that turns, chases (greedily or along the shortest path), evades bombs or drifts along an axis.
- Fourteen power-up effects — extra bombs, fire, full fire, speed, wallpass, remote, bombpass, flamepass, invincibility, kick, punch, pierce, an extra life, and a skull with seven diseases that spread on touch.
- A stage campaign — the 1985 NES fifty-stage table with its eight monsters and eight power-ups, an exit door, a 200-second clock and its flood, bonus stages, lives and chain-kill scores.
- Battle matches — two to four bombers, teams, item sets, sudden-death pressure blocks spiralling in, best of N
rounds, and three arenas:
classic,bracketsandduel. - Difficulty for campaigns — monster population, speed, chasing, flood and time scaled together, with Easy, Normal and Arcade, the last playing the stage table exactly.
- Any arena — a border-and-pillar template or your own string map of hard, soft and floor tiles, starts and hints, up to 16,384 tiles.
- Snapshots — the field and the game save and restore their state.
Good for
- Bomb-maze stage games, in the style of the 1985 NES Bomberman, with monsters, an exit door and a clock.
- Party battle games for two to four players and bots, in the style of Super Bomberman's battle mode.
- A single-player game against bots, since a bot reads the same board and gives the same intent as a player.
- Grid games that gain bombs — a maze chase whose hero can blast breakable walls, or a block-pushing game where blasts break the blocks.
- Dungeon crawlers with bomb items, using the bomb field and danger map under your own actors and rules.
- Bomb puzzles, where
blastFrompreviews a blast without changing anything.
Make it yours
The pack factory takes no options; everything is the configuration you hand to createBombField, createBomberBot or
createBomberGame. bombermanPreset and battlePreset build complete games from a few choices, and any field of the
result can then be replaced: stages, monster kinds, items, bomb rules, bomber rules, the clock, the arena and the goal.
Fuse length, flame time, chain delay, who may be hurt by their own or their team's bombs, and which items flames
destroy are all settings.
Very different games come from the same pack. A campaign on 31 by 13 scrolling stages with a co-op bot, monsters
released from a bombed door and a flood when the clock runs out, is one preset. A four-player battle in the brackets
arena with teams, kick and remote from the start, chain ripple and sudden death is another. And a maze chase can put a
bomb field on its own maze, feed field.blocked to its walker as the walls, and kill its ghosts wherever flameAt
finds a flame.
A quick look
A campaign at Normal difficulty, a player's input, a frame, and the events to present:
const gb = game.gridBombs;
const g = gb.createBomberGame(gb.bombermanPreset({ difficulty: 'normal' })); // or battlePreset({...})
g.control('p1', { move: 'left', bomb: true, action: false });
g.tick(dt);
for (const e of g.drain()) { /* exploded, enemy-died, picked, door-open, stage-clear, round-over… */ }
Works with
grid-walker— every actor moves tile centre to tile centre with its walker; it comes as a package dependency and need not be composed.maze-chase,grid-kick,boulder-dash,chips-challenge— grid games that can put a bomb field on their own arena and read its flames for their own deaths, and the packs to reach for when the game is about ghosts, sliding blocks or falling rocks rather than bombs.encounter-directorandarena— for a sequence of rooms, one bomber game per room.typography— for the score, clock and lives.
Good to know
- Nothing is drawn: your game presents the events and the state.
- Movement is four-way on tile lanes, and flames are per tile: a bomber dies when the tile under its centre burns.
- Bots plan against the board as it is: they do not predict where opponents will bomb, and do not kick or punch on purpose.
- Bounds are reported as errors: 16,384 tiles, 128 live monsters, 64 bombs and range 64 per bomber, and at most eight 60 Hz frames per tick.
- The campaign's speeds and fuse times are estimates on the documented classes, and its six secret bonus items and passwords are not implemented.






