# Rogue
This is a modified version of the classic Unix game *Rogue*, forked from the
version distributed with NetBSD. It's designed for a single user and tracks all
of that user's high scores, in contrast to the upstream program, which
maintains a systemwide high-score table with one score per user.
## Requirements
This program requires:
- a C23 compiler;
- a POSIX.1-2024-compatible implementation of `make`;
- the `strlcpy()` and `strlcat()` functions;
- an implementation of the `curses` library.
The program is known to compile out of the box on OpenBSD 7.9 and FreeBSD 15.1.
On macOS, you'll just need a more recent implementation of `make` than the
20-year-old version of GNU `make` that Apple ships.
## Installation
Run `make` to compile the program and `make install` to install it. The program
is installed under `/usr/local` by default and thus must be installed as the
`root` user, but the installation prefix can be customized by editing the
makefile.
This repository also includes a copy of "A Guide to the Dungeons of Doom," part
of the classic *UNIX User's Supplementary Documents*, in `USD.doc`. This
requires `groff` or another `troff`-compatible program, specified in the
makefile. Run `make` from the `USD.doc` directory to generate `rogue.txt` and
`less -R rogue.txt` to read the document.
The program will save its data in `$XDG_DATA_HOME/rogue` if the `XDG_DATA_HOME`
environment variable is defined. If it's not defined, the program will
flagrantly disregard the XDG Base Directory Specification and store its data in
`$HOME/.rogue`.
## History and Source
The original *Rogue* was created around the year 1980 by Glenn Wichman, Michael
Toy, and Ken Arnold. The version distributed in this repository is derived from
a clone created by Timothy Stoehr that is distributed with NetBSD.
The source code was copied from the trunk branch of [the official NetBSD src
Git mirror][1] in 2026 and used to develop this fork in a new repository.
Later, the `games/rogue` directory was extracted from the NetBSD `src`
repository mirror using [`git-filter-repo`][2], preserving the commit history.
The changes from the original repository were rebased onto this extracted
repository, with minor edits to commit history to remove the `HISTORY` file
that held a copy of the commit history and a referene to that file in this
readme. The branch `initial-version` contains an unmodified copy of the commit
history from the initial standalone fork.
## License
The original source files contain both a three-clause BSD license and an
informal license statement that forbids commercial use. (The USD document
describes the program as "public domain," but this is obviously inaccurate.)
New code added in this repository is licensed under an ISC-style license.
See the `LICENSE` file for details.
[1]: https://github.com/NetBSD/src/tree/trunk
[2]: https://github.com/newren/git-filter-repo