A simple yet powerful roguelike game built from scratch in C using ncurses.
Explore procedurally generated dungeons, navigate through rooms, and move your character in a terminal-based game world.
-
🧭 Procedural dungeon generation
- Rooms and corridors created randomly at each run.
- Smooth connections between rooms.
-
🎮 Player movement
- Navigate using
W A S D
keys. - Real-time updates with field of view (FOV).
- Navigate using
-
🔦 Line of sight + Fog of War + Field Of View
- Only nearby tiles are visible.
- Previously seen tiles are dimmed (exploration-style).
-
📺 Ncurses-based terminal rendering
- Fast, minimal graphics in the terminal.
- Works on any Linux/macOS terminal with
ncurses
support.
W
Move Up
A
Move Left
S
Move Down
D
Move Right
Q
Quit Game
roguelike_game/
|--- include/
| |--- rogue.h
|--- src/
| |--- main.c
| |--- draw.c
| |--- engine.c
| |--- player.c
| |--- map.c
| |--- room.c
| |--- fov.c
|--- makefile
- GCC (or any C compiler)
ncurses
library
git clone https://github.com/28anmol/roguelike_game.git
cd roguelike_game
make
- Manual memory management using
calloc
- Procedural generation of dungeon rooms
- Terminal UI with
ncurses
library - 2D arrays for tile based maps
- Use of pointers
- Visibility algorithms (field of view and line of sight)
Ignacio Oyarzabal
Followed the tutorial: Visit Tutorial
Please feel free to contribute, fork or use it as a learning project.