Skip to content

28anmol/roguelike_game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧙 Terminal Roguelike Game in C 🧙

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.

🚀 Features

  • 🧭 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).
  • 🔦 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.

🎮 Controls

W             Move Up
A             Move Left
S             Move Down
D             Move Right
Q             Quit Game

📁 Code Base Structure

roguelike_game/
|--- include/
|       |--- rogue.h
|--- src/
|       |--- main.c
|       |--- draw.c
|       |--- engine.c
|       |--- player.c
|       |--- map.c
|       |--- room.c
|       |--- fov.c
|--- makefile

🧰 Requirements

  • GCC (or any C compiler)
  • ncurses library

🛠️ Build Instructions

git clone https://github.com/28anmol/roguelike_game.git
cd roguelike_game
make

📌 Key Concepts

  • 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)

📸 Screenshots & GIFs

drawing drawing drawing drawing

Rogue Game Play

💖 Credits

Ignacio Oyarzabal
Followed the tutorial: Visit Tutorial
Please feel free to contribute, fork or use it as a learning project.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published