Skip to content

Terminal-based roguelike game built in C++ with procedural dungeon generation, fog-of-war, teleportation, and turn-based combat.

Notifications You must be signed in to change notification settings

HrishikeshUchake/RogueLike-Dungeon-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Roguelike Dungeon Generator (C++)

A terminal-based roguelike game built in modern C++, featuring procedural dungeon generation, fog-of-war, turn-based combat, and teleportation mechanics. Uses ncurses for a retro terminal UI and supports saving/loading dungeons via command-line options.


Features

Core Gameplay

  • Procedural dungeon generation: Randomly generated rooms, corridors, and staircases
  • Fog-of-war system: Visibility limited to nearby tiles for immersive exploration
  • Turn-based combat: Strategic gameplay with an event queue system
  • Persistent save system: Save and load dungeon state from disk ~/.rlg327

Customization

  • Custom monster definitions: Create your own monsters! Saved and loaded from ~/.rlg327/monster_desc.txt
  • Custom object definitions: Design your own items! Saved and loaded from ~/.rlg327/object_desc.txt
  • Equipment system: Wear, remove, and manage various items and gear

Special Abilities

  • Teleportation mechanics: Strategic movement across the dungeon
  • Ranged attacks: Combat from a distance
  • Magic spells: Poison Ball and Fireball casting
  • Inventory management: Complete item handling system

Technical Features

  • Built with ncurses for cross-platform terminal graphics
  • CHANGELOG tracking for version releases
  • Command-line argument support for various game modes

Prerequisites

  • C++ Compiler (GCC/Clang with C++11 support or higher)
  • ncurses library
    # Ubuntu/Debian
    sudo apt-get install libncurses5-dev libncursesw5-dev
    
    # macOS
    brew install ncurses
    
    # CentOS/RHEL
    sudo yum install ncurses-devel
  • Make build system

Installation & Setup

1. Clone the Repository

git clone https://github.com/HrishikeshUchake/RogueLike-Dungeon-Game.git
cd RogueLike-Dungeon-Game

2. Compile

make clean  # Clean previous builds
make        # Compile the game

3. Setup Configuration Directory

The game automatically creates ~/.rlg327/ directory for save files and custom definitions.


Usage

Basic Gameplay

./dungeon           # Start new game

Save & Load

./dungeon --save    # Save current dungeon state
./dungeon --load    # Load previously saved dungeon

Custom Content

./dungeon --parse   # Parse custom monster and object descriptions

Note: Ensure the following files exist with valid content:

  • ~/.rlg327/monster_desc.txt - Custom monster definitions
  • ~/.rlg327/object_desc.txt - Custom object definitions

Controls

Movement

Key Action
7/8/9/4/6/1/2/3 Move (numeric pad or y/k/u/h/l/b/j/n)
5, ., Space Rest / Skip turn
<, > Ascend/Descend stairs (on stair tiles)

Combat & Magic

Key Action
a Enter ranged attack mode (f to fire)
p Cast Poison Ball
F Cast Fireball

Inventory & Equipment

Key Action
i Show inventory
e Show equipment
I Inspect inventory item
w Wear item
t Take off equipment
d Drop item

Exploration & Interface

Key Action
f Toggle fog of war
g Enter teleportation mode
r Random teleport target
m View visible monsters
L Look mode (inspect tiles)
Q Quit the game

Game Mechanics

Dungeon Generation

  • Algorithmic room placement with connecting corridors
  • Randomized stair placement for level progression
  • Balanced monster and item distribution

Combat System

  • Turn-based with priority queue for entity actions
  • Line-of-sight calculations for ranged attacks
  • Equipment affects combat statistics

Fog of War

  • Dynamic visibility system
  • Explored areas remain visible but dimmed
  • Toggle option for development/debugging

File Structure

~/.rlg327/
├── dungeon          # Saved game state
├── monster_desc.txt # Custom monster definitions
└── object_desc.txt  # Custom object definitions

Screenshots

Dungeon View Monster List Teleportation Gameplay Save Game

Screen.Recording.2025-07-18.at.3.49.08.PM.mov
Screen.Recording.2025-07-18.at.3.59.52.PM.mov


Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/new-feature)
  3. Commit your changes (git commit -am 'Add new feature')
  4. Push to the branch (git push origin feature/new-feature)
  5. Create a Pull Request

Development

Building for Debug

make debug    # Build with debug symbols

Clean Build

make clean    # Remove compiled objects and executable

License

This project is available under the MIT License. See the LICENSE file for more details.


Acknowledgments

  • Built using the ncurses library for terminal-based graphics
  • Inspired by classic roguelike games like Rogue, NetHack, and Angband
  • Developed as part of coursework/personal project at Iowa State University

Created by Hrishikesh Uchake

For questions, issues, or contributions, please open an issue on GitHub!

License

MIT License — feel free to use, modify, or expand this project for personal or academic use.


Author

Built by Hrishikesh Uchake

About

Terminal-based roguelike game built in C++ with procedural dungeon generation, fog-of-war, teleportation, and turn-based combat.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages