restoHack is a full-blooded resurrection of Hack, the 1984 roguelike that spawned NetHack. Not a remake. Not a reboot. This is software preservation with a blowtorch and a scalpel.
The goal: make the original code compile, run, and dungeon-crawl exactly as it did when floppy was King.
Think resto-mod: the soul stays vintage, the internals get a precision rebuild.
Luck and death, in that order.
- Modern Build System – CMake replaces Makefiles. Clean builds on Linux, FreeBSD, and other Unix systems.
- Authentic Systems – Over a dozen original systems restored from source, untouched in design.
- Complete K&R Modernization – Entire codebase converted to ANSI C (~250 functions updated).
- Unix/Linux Fixes – No more hardcoded BSD paths or FS quirks.
- Cross-Platform Verified – Works on Linux (glibc/musl) & FreeBSD; CI-tested.
- Tiny Executable – 479KB of pure roguelike, with save/load intact.
Tested on: Arch, Alpine, FreeBSD 14.2. macOS support pending. Arch users can install via the AUR.
your choice of helper
yay -S restohack
paru -S restohack
Download from Releases and extract:
mkdir -p ~/Games/restohack
cd ~/Games/restohack
tar -xzf restoHack-static-YYYYMMDD-linux-x86_64.tar.gz
Option 1: Run immediately (Linux) (static binary, no dependencies):
./run-hack.sh
Option 2: Build from included source (requires cmake, gcc, ncurses):
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build
./build/hack
BSD Systems: See BSD Build Instructions below.
Requirements: git
, cmake
, a C compiler (gcc
or clang
), plus ncurses
or termcap
.
The default method for a stable, optimized build:
git clone https://github.com/Critlist/restoHack.git
cd restoHack
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build .
./hack
For hacking on the code, with debug symbols and optional sanitizers:
git clone https://github.com/Critlist/restoHack.git
cd restoHack
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Debug -DENABLE_SANITIZERS=ON
cmake --build .
./hack
Wipes prior build artifacts before rebuilding:
rm -rf build && mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build .
./hack
FreeBSD:
# Install dependencies
pkg install cmake gcc ncurses
# Build from hybrid tarball or git clone
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build
./build/hack
OpenBSD:
# Install dependencies
pkg_add cmake gcc ncurses
# Build with explicit compiler paths
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER=/usr/local/bin/gcc
cmake --build build
./build/hack
NetBSD:
# Install dependencies
pkgin install cmake gcc ncurses
# Use pkgsrc paths for libraries
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH=/usr/pkg
cmake --build build
./build/hack
- Modern Locking – Replaced
link()
locks withflock()
for clean recovery. - NetBSD/pkgsrc Builds – Fixed curses detection and RNG seeding via CMake feature checks.
- Tombstone Crash – Fixed segfault in RIP screen by patching buffer overflow in name centering.
Fix what breaks, preserve what works. The original 1984 gameplay, balance, and feel remain untouched—only the infrastructure has been made reliable for modern systems.
You’re the @
, diving into the Mazes of Menace to steal the Amulet of Yendor.
Expect monsters, magic, cursed loot, and permadeath. Controls are Vi-style (hjkl
). Survival is… unlikely.
Bug fixes, portability patches, packaging help—welcome. Want to port to Plan 9? Go for it. Just document changes and respect the code.
3-Clause BSD. Do what you want, just don’t sue us. See LICENSE
.