A tiny terminal-based roguelike written in modern C++ (C++20) using the Win32 Console API.
The goal is to relearn C++ by building up a classic roguelike step by step: map, monsters, items, FOV, and more.
💻 Platform: Windows (Win32 console).
🧪 Style: modern C++ with RAII,std::vector,enum class, and Doxygen comments.
- C++20
- CMake
- Win32 Console API (
WriteConsoleOutputA, etc.)
From a terminal (PowerShell / CMD) in the project root:
# 1. Configure
cmake -S . -B build
# 2. Build
cmake --build build --config Release
# 3. Run (path may vary slightly)
./build/TermRogue.exe📝 Make sure CMake is in your PATH, and you’re using a generator with a C++20-capable compiler (e.g., MSVC from Visual Studio).
- ⬅️➡️⬆️⬇️ – Move the player
@ Q– Quit the game
High-level roadmap for the project. We’ll tick these off as they get implemented and stable.
- Choose C++20 and set up CMake
- Decide on rendering (Win32 Console API)
- Basic project structure (
src/, headers, source files)
- Game loop (
run()with input → update → render) - Console abstraction (
Consoleclass with back buffer) - Player
@that can move around the screen - Simple input handling (arrow keys + quit key)
-
TileandTileType(Floor,Wall) -
Mapclass with 2D grid backed bystd::vector<Tile> - Simple test room (walls on border, floor inside)
- Movement blocked by walls
- Random dungeon generation (rooms & corridors)
- Player spawn in a valid floor tile of a generated dungeon
- Basic
Entitystruct (player + monsters) - Turn-based step system (player turn → monsters turn)
- Simple monster placement on the map
- Compute FOV around player (e.g., shadowcasting or ray-based)
-
visible/exploredflags on tiles - Dim rendering for explored-but-not-visible tiles
- Bump-to-attack melee combat
- HP, attack, defense stats
- Death handling for monsters & player
- Message log at bottom of screen (e.g., last N messages)
- Item representation & glyphs
- Items on the ground (potions, weapons, etc.)
- Basic inventory system
- Using items (e.g., healing potions)
- Simple AI (chase player if in range)
- Basic pathfinding (BFS or A*)
- Behavior variety (patrolling, fleeing, ranged attacks)
- Experience & leveling system
- Deeper dungeon levels (stairs up/down)
- Stronger monsters & loot on lower levels
- Title screen & game over screen
- Help overlay / controls reference
- Color polishing and minor effects
- Serialize game state (map, entities, items, etc.)
- Load & continue runs
- Split logic into subsystems (Input, Render, Combat, AI, etc.)
- Add tests for key systems (FOV, pathfinding, level generation)
- General architecture polish
- Doxygen-style comments are included in headers and implementations.
- You can generate documentation with Doxygen if you add a config file later.
- Relearn and practice modern C++ in a fun, hands-on way.
- Build a small but complete roguelike that runs 100% in the terminal.
- Keep the code clean, commented, and easy to iterate on.