# Code Becomes a Roguelike Dungeon _GitHub Copilot CLI transforms code into a roguelike dungeon, showcasing AI's potential in game development and creative coding._ **Published:** 2026-05-12 **Source:** https://www.startuphub.ai/ai-news/technology/2026/code-becomes-a-roguelike-dungeon --- GitHub developer Lee Reilly has turned a codebase into a playable roguelike dungeon using the [GitHub Copilot CLI](https://github.blog/ai-and-ml/github-copilot/dungeons-desktops-building-a-procedurally-generated-roguelike-with-github-copilot-cli/). The tool, named GitHub Dungeons, generates a unique dungeon map for every repository, with its layout evolving alongside code commits. This project leverages procedural generation, a method of creating content algorithmically rather than by hand. For roguelikes, this typically means generating levels, maps, or enemies using rules and randomness, ensuring each playthrough offers a fresh experience. The exact phrase **procedurally generated roguelike** describes this core mechanic. ## From Code to Combat The extension transforms a repository into a terminal-based adventure where players navigate using arrow keys, fight 'bugs', and search for an exit. Each repository yields a distinct map, and every code change reshapes the dungeon's layout. Permadeath, a genre staple, means starting over upon defeat. Reilly described the prompt that kicked off the project: "Build a GitHub CLI extension in Go that takes the current repository and turns it into a playable roguelike dungeon, with dungeons generated with BSP." The result is a testament to the creative applications of AI in development. ## AI Assistance in Game Design Working with GitHub Copilot CLI, particularly the `/delegate` command, allowed Reilly to describe desired behaviors and have the AI handle implementation. This included generating features like progressively harder levels and invincibility cheat codes. This approach is akin to having an army of NPCs available for tasks, as detailed in discussions about [Copilot CLI: Chat vs. Quick Commands](/ai-news/technology/2026/copilot-cli-chat-vs-quick-commands). Reilly found that iterating with Copilot kept him in a game design mindset, minimizing context switching to implementation details. ## The Art of Procedural Maps At the core of GitHub Dungeons' map generation is Binary Space Partitioning (BSP). This technique involves recursively splitting a space into smaller regions until they are small enough to become rooms. These rooms are then connected by corridors. BSP is ideal for roguelikes because it creates structured, replayable, and navigable maps. It balances predictability with enough randomness to feel organic, a key element for the genre's appeal. The same commit always generates the same map. Different repositories produce layouts that feel structurally distinct. As the code changes, the dungeon evolves with it. This project highlights how tools like the [GitHub Copilot CLI builds emoji generator](/ai-news/technology/2026/github-copilot-cli-builds-emoji-generator) can be extended for novel applications, blurring the lines between coding and creative design. --- Original analysis from [startuphub.ai](https://www.startuphub.ai), the #1 AI startup directory. © StartupHub.ai. All rights reserved. You may not republish this article in full without a license. Search engines and AI research tools may crawl and summarize for reference. Bulk reproduction or model training on this content requires a license. See https://www.startuphub.ai/terms.