Skip to content

About

A classic roguelike terminal game written in Pascal (Free Pascal).

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

Terminal Dungeon

A classic roguelike terminal game written in Pascal (Free Pascal). Descend into the ancient sewers and dragon halls, fight monsters, collect powerful items, and claim the legendary Sword of Div.

Screenshot placeholder

Features

  • Procedurally generated dungeons – each playthrough is unique.
  • 20 levels split into two zones: Sewers (1‑10) and Dragon Halls (11‑20).
  • Boss fights – Rat King (level 10) and Xyrsar, the Winged Bane (level 20).
  • Rich equipment system – weapons, armour, shields, helmets, boots, rings. Equip two rings at once stacks now identical effects!
  • Item rarities and depth scaling – deeper levels spawn better items.
  • Line‑of‑sight monster AI – enemies chase you when they see you, otherwise wander randomly.
  • Dodge and defence mechanics – reduce incoming damage and avoid attacks.
  • Status effects – poison, strength buff, holy water (double damage against undead/demons).
  • Full inventory management – pick up, use/equip, drop items. Supports up to 20 items (keys 1‑9, a‑t).
  • Save / load – your progress is saved to savegame.dat (includes current level).
  • Lore screens – story integration at start, entering Dragon Halls, and after defeating the final boss.
  • ASCII graphics – monsters, items, and the player are colour‑coded.

How to Play

  • Movement – arrow keys.
  • Inventory – press i, then select an item with number (1‑9) or letter (a‑t). Then:
    • u – use/equip the item.
    • d – drop the item on the ground.
  • Equipment screen – press e, select a slot (1‑7) and then u to unequip.
  • Save game – press s during play.
  • Quit – press q (or close the terminal).

Your goal is to reach level 20, slay Xyrsar, and claim the Sword of Div.

Compilation

The game is written in Free Pascal (fpc). No external libraries are needed.

  1. Install Free Pascal Compiler from www.freepascal.org.
  2. Download all .pas files (the complete source code).
  3. Open a terminal in the source directory and run:
fpc main.pas
  1. Run the executable:
  • Windows: main.exe
  • Linux/macOS: ./main

System Requirements

  • Any system with a terminal/console that supports ANSI colour codes (Windows 10/11, Linux, macOS).
  • Free Pascal Compiler (version 3.2.0 or later) to build from source.
  • No additional dependencies.

Controls Summary

Key Action
Arrow keys Move player
i Open inventory
e Open equipment screen
s Save game
q Quit (exit game)
1‑9, a‑t Select inventory item
u Use / equip / unequip item
d Drop item (from inventory)
ESC Cancel selection

Code

On the title screen, select Code and input your secret code.

Credits

  • Developer: [Brage1025]
  • Language: Object Pascal (Free Pascal)
  • Inspired by: classic roguelikes like NetHack, Dungeon Crawl Stone Soup, and Rogue.

License

This project is licensed under the GNU General Public License v3.0 – see the LICENSE file for details.

Download

Pre‑compiled binaries are available on itch.io.
Source code is hosted on GitHub.


"To <div> or not to <div>, that is the question." — Brage1025

About

A classic roguelike terminal game written in Pascal (Free Pascal).

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages