No description
  • Python 95.6%
  • PowerShell 2.4%
  • Shell 2%
Find a file
Claude 942137a055 Add campaign levels 4-10 with escalating mechanics
Extend the bundled campaign from three levels to ten, ramping the existing
mechanics rather than adding new ones:

- 4 Black Ice: ice field where only chips, walls, and the exit stop a slide
- 5 Two Locks: two key colors plus a decoy door that consumes the only key
- 6 Deadman's Switch: plate too far from its gate to hold in person
- 7 Chain Reaction: two-thick soft plugs, one bomb per layer, with retreats
- 8 Frozen Circuit: the slide begins the moment you step off the plate, so
  only a parked bomb can hold the gate for the length of the lane
- 9 Lockdown: blast a caged key, then key, door, plate, and gate in sequence
- 10 The Circuit: a bomb on a plate whose blast travels through the gates it
  is holding open, clearing the soft block behind them

Each level is covered by a tick-exact golden solve in test_golden.py, which
pins down that it stays winnable, that the intended trick still works, and
that the scripted route never walks into its own blast.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-19 19:20:10 -07:00
.claude/agents Restore .gitignore, TECHNICAL.md, and agent definitions 2026-07-19 17:59:21 -07:00
bomb_circuit Add campaign levels 4-10 with escalating mechanics 2026-07-19 19:20:10 -07:00
tests Add campaign levels 4-10 with escalating mechanics 2026-07-19 19:20:10 -07:00
.gitattributes Add packaging and line-ending config 2026-07-19 17:58:29 -07:00
.gitignore Restore .gitignore, TECHNICAL.md, and agent definitions 2026-07-19 17:59:21 -07:00
main.py Add rendering, input mapping, and fixed-timestep loop 2026-07-19 17:58:40 -07:00
pyproject.toml Add packaging and line-ending config 2026-07-19 17:58:29 -07:00
README.md Add campaign levels 4-10 with escalating mechanics 2026-07-19 19:20:10 -07:00
start.ps1 Add launcher scripts and document setup 2026-07-19 17:58:48 -07:00
start.sh Add launcher scripts and document setup 2026-07-19 17:58:48 -07:00
TECHNICAL.md Restore .gitignore, TECHNICAL.md, and agent definitions 2026-07-19 17:59:21 -07:00

Bomb Circuit

A top-down 2D puzzle game combining the tile-based puzzle mechanics of Chip's Challenge with the destructible-terrain and bomb mechanics of classic Bomberman.

Concept

Navigate a grid-based level, collect the required items, and reach the exit. Blocked paths are cleared with bombs. Hazards, keys, and one-way mechanisms turn each level into a logic puzzle where the order of actions matters.

Core Gameplay

  • Grid movement. The player moves one tile at a time across a fixed grid.
  • Collect to unlock. Each level requires a set number of chips (or circuit tokens) before the exit opens.
  • Bombs clear the way. Drop a bomb to destroy soft blocks and open new routes. Bombs detonate on a timer and propagate in the four cardinal directions.
  • Chain reactions. A blast that reaches another bomb triggers it immediately.
  • Puzzle logic. Keys open locked doors, ice tiles slide the player, and pressure plates toggle gates. Solving a level means sequencing these correctly.

Tiles & Objects

Tile Behavior
Floor Walkable.
Wall Solid. Indestructible.
Soft block Destructible by bomb blast.
Chip / token Collectible. Required to open the exit.
Locked door Requires a matching key.
Key Collectible. Opens one door of its color.
Bomb Player-placed. Timed explosion in four directions.
Ice Slides the player until a wall stops them.
Pressure plate Toggles linked gates while occupied.
Exit Ends the level once all chips are collected.
Enemy Moves on a set pattern. Contact is lethal; blasts destroy it.

Controls

Input Action
Arrow keys / WASD Move one tile
Space Place bomb
R Restart level
Esc Pause
F / F11 Toggle fullscreen

The window is resizable (drag it or use the OS maximize button) and the picture scales to fit. Press F (or F11), or double-click the window, to toggle fullscreen.

Win & Lose Conditions

  • Win: Collect all required chips, then step onto the exit.
  • Lose: Caught in a bomb blast, touched by an enemy, or trapped with no valid moves.

Getting Started

Requires Python 3.11+. The launcher scripts create a local virtual environment, install dependencies (pygame-ce), and start the game.

# Linux / macOS / Git Bash
./start.sh

# Windows PowerShell
./start.ps1

With no argument the bundled campaign plays (level1 → level10), auto-advancing a moment after each "LEVEL COMPLETE"; finishing the last level shows "CAMPAIGN COMPLETE" (press R to replay from the start).

Pass a level file to play just that one level instead:

./start.sh bomb_circuit/levels/level2.json

Or run it manually after pip install -e .:

python -m bomb_circuit

Run the logic tests (headless, no display required):

pip install -e ".[dev]"
pytest

Roadmap

  • Core grid engine and player movement
  • Bomb placement, timers, and blast propagation
  • Level loader (JSON level format)
  • Chip collection and exit gating
  • Keys, doors, ice, and pressure plates
  • Pixel-art graphics
  • Enemy patterns
  • Sound
  • Level editor

Milestones 15 are implemented. The exit unlocks only once every chip is collected. Enemies (milestone 6) are next.

Status

Playable, with pixel-art graphics: collect the chips, then reach the exit. Bomb soft blocks with Space, carry keys to open matching doors, slide across ice, and hold gates open by weighting their pressure plate (a parked bomb works too). Ten bundled levels of rising difficulty:

# Level Introduces
1 Demolition Yard Bombs and soft blocks
2 Chain Gang Chain reactions
3 The Gauntlet Chips, ice, keys, plates in one line
4 Black Ice An ice field where only chips and walls stop a slide
5 Two Locks Two key colors, and a door that strands you if opened
6 Deadman's Switch A plate too far from its gate to hold yourself
7 Chain Reaction Two-thick plugs: one bomb per layer, with a retreat
8 Frozen Circuit The slide starts the moment you step off the plate
9 Lockdown Blast a caged key, then key, door, plate, and gate in sequence
10 The Circuit A blast that opens its own gate to reach the block behind it

Every bundled level has a regression test that solves it end to end (tests/test_golden.py).

Sprites are authored as 16×16 pixel templates built into surfaces at load time (no image files) and scaled up crisply — see render/sprites.py. See TECHNICAL.md for architecture.