Dungeons & Desktops: A Procedurally Generated Roguelike Built with GitHub Copilot CLI
Key point
Using GitHub Copilot CLI, a code repository was turned into a BSP-based roguelike dungeon.
Details
I took part in the GitHub Copilot CLI Challenge and built GitHub Dungeons. It turns a codebase into a playable roguelike dungeon, letting you move with the arrow keys in the terminal to squash bugs and find the exit. The project is written in Go, and it has a permadeath structure where you restart once your HP hits 0.
Map generation is based on Binary Space Partitioning (BSP). Since the latest commit SHA is used as the seed, the same commit always produces the same dungeon, and the layout changes whenever the repository or commit changes.
/delegate was central to the workflow. Features were handed off to a cloud coding agent, which generated PRs, and I reviewed and refined the results from there. I even attached a dungeon scribe agent that handled difficulty tuning, cheat codes, documentation, and ASCII art diagrams, letting me focus more on game design and the play experience than on implementation.
The BSP flow is simple.
- Start with one large rectangular space.
- Recursively split it horizontally or vertically into smaller regions.
- Stop once the regions are too small to split further.
- Turn each leaf region into a room, then connect them with L-shaped corridors by walking back up through the parents.
This approach is more structured than pure randomness, yet less predictable than a fixed grid. The result is a dungeon that's different every time, while still remaining navigable.
This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.
Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.