Bomberman
A complete Bomberman clone in Python and Pygame, built as a full software-engineering project: requirements spec, architecture, work plan, a tested logic core and a presentation.
Runs on Windows with one double-click; the installer adds a desktop and Start-menu shortcut.
Level 1, drawn from the game’s own level file: walls, brick, the player, a bomb going off and two balloon enemies.
what’s in the game
Gameplay
- 5 levels, stored as editable text files
- Two enemy types – one wanders, one hunts you with BFS
- Power-ups for bombs, range and speed
- Chain-reaction explosions, a level timer and lives
Product polish
- English or Hebrew, with right-to-left text rendering
- Sound effects and music synthesized in code
- Pause, persistent high scores and saved settings
- One-click launcher and app shortcut for Windows
architecture
The key design decision: the game logic never imports Pygame. That is what lets every rule be tested without opening a window.
Pygame
app.pymain loop, input, screensrenderer.pyall drawingsound.pyeffects & musicpure Python
game.pygame rules and the state machineai.pywander & BFS chaseentities.pyplayer, enemy, bomblevel.pylevel parsing & validationgrid.pythe tile mapi18n.pytranslationstext.pyRTL Hebrewsettings.pylanguage & soundhighscores.pyscore tablegame states
Seven states, and every path leads back to the menu.
two algorithms that make it smart
The enemy hunts you with BFS
Breadth-first search finds the first step on the shortest path to the player, around walls and bombs.
queue = deque([(start, None)])
while queue:
pos, first = queue.popleft()
for d in Direction:
nxt = step(pos, d)
if nxt == goal: return first or d
if walkable(nxt) and nxt not in seen:
seen.add(nxt)
queue.append((nxt, first or d))
Chain reactions with a queue
Every bomb a flame touches joins the queue, and each bomb explodes exactly once.
queue = list(due_bombs)
while queue:
bomb = queue.pop()
if bomb in done: continue
done.append(bomb)
for tile in flame_path(bomb):
other = bomb_at(tile)
if other and other not in done:
queue.append(other)
quality
- Tests cover game logic, enemies, bombs, levels, high scores, sound synthesis, translations and right-to-left text.
- Every tunable value – speeds, timers, scores – lives in one config file.
- The work plan split the team into four roles: management & spec, game logic, enemies & levels, and interface & quality.
key insights
Separate logic from display
Keeping Pygame out of the rules made the core testable, and turned the renderer into a thin layer that is easy to change.
Tests alongside the code
Writing tests in parallel with each module, not at the end, kept the last weeks free for user testing and polish.
Data over hard-coding
Levels are plain text files and constants live in one place, so the game can grow without touching the engine.
Engineering is more than code
A spec, a plan with roles and a presentation are what make a team project deliverable on time.
tech stack
get in touch
Questions about a project, the code or the way it was built? I'm always happy to talk about it.