DBDG is a small Python/Pygame cave puzzle game inspired by classic tile-based digging games.
The player digs through dirt, collects gems, avoids falling rocks, and reaches the exit once enough gems have been collected. The project uses simple programmatically generated graphics and lightweight 8-bit-style sound effects, so no external art assets are required.
Finished small game / portfolio side project
The game is playable and includes multiple levels, simple physics rules, generated assets, tests, and optional packaging support.
- Tile-based cave gameplay
- Dirt digging
- Gem collection
- Falling rocks and gems
- Basic rolling physics
- Exit unlock logic
- Restart and pause controls
- Programmatically generated graphics
- Generated 8-bit-style WAV sound effects
- ASCII-based level files
- Pytest-based test suite
- Optional Windows executable packaging
- Arrow keys: move, dig dirt, collect gems, push rocks
- R: restart level
- P: pause
- ESC: quit
- Rocks and gems fall downward when unsupported.
- Rocks can roll sideways if blocked below and space is available.
- The player digs through dirt by moving into it.
- Gems increase the score.
- The exit opens when enough gems have been collected.
- Python
- Pygame
- Pytest
- PyInstaller optional
python -m venv .venvWindows PowerShell:
.\.venv\Scripts\Activate.ps1macOS/Linux:
source .venv/bin/activatepip install -e ".[dev]"
python -m dbdgpytest -qExample Windows build with PyInstaller:
pyinstaller -F -n dbdg --clean -i NONE -w -m dbdgsrc/dbdg/
engine/ # grid and physics logic
game.py # Pygame loop and rendering
__main__.py # python -m dbdg
assets/sfx/ # generated WAV files
levels/ # ASCII levels
tests/ # pytest tests
.vscode/ # editor setup
DBDG is a small completed side project. It was built as an LLM-/agent-friendly Python codebase with separated game logic, simple rendering, generated assets, and tests.
MIT