Critlist/restoHack
Critlist/restoHack has 57 GitHub stars and 6 forks. GitHot measured 0 in 7 days. Last checked 2026-11-15 16:14 UTC. Last push 2026-11-05.
What you can do
- 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.
- Ongoing K&R Modernization – Most of the codebase is converted to ANSI C; some 1985-era definitions and unprototyped declarations remain.
- Unix/Linux Fixes – No more hardcoded BSD paths or FS quirks.
Measured star growth
- in 24h
- Update delayed
- in 7 days
- 0
- in 15 days
- Update delayed
- in 1 month
- Update delayed
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
About
A faithful restoration of the original 1984-85 Hack v1.0.3 by Andries Brouwer. Modern CMake build, cleaned and audited C source tree, and safe system compatibility for contemporary platforms.
Developer ToolsREADME.md
OriginalrestoHack: Bringing 1985 Hack Back from the Dead
restoHack is a full-blooded resurrection of Hack 1.0.3 (1985), the version of Hack 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 floppies were king.
Think resto-mod: the soul stays vintage, the internals get a precision rebuild.
Philosophy: "Fix what breaks, preserve what works" - authentic 1985 gameplay with modern build system and safety improvements.
Read the Complete History of Hack
From Rogue (1980) to NetHack's rise, through decades of digital decay, to restoHack's 2025 resurrection
Screenshots
Luck and death, in that order.
Features
- 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.
- Ongoing K&R Modernization – Most of the codebase is converted to ANSI C; some 1985-era definitions and unprototyped declarations remain.
- Unix/Linux Fixes – No more hardcoded BSD paths or FS quirks.
- Cross-Platform Verified – Linux (glibc/musl) and macOS are CI-tested on GitHub Actions; FreeBSD was CI-tested on Cirrus CI until that service shut down in June 2026.
Tested on: Arch, Alpine, FreeBSD 14.3, WSL, and aarch64. macOS support verified via runner. Arch users can install via the AUR.
Recognition:
RestoHack was recognized by GitHub as a For the Love of Code category winner (2025).
Featured in the official GitHub Blog:
From Karaoke Terminals to AI Resumes — The Winners of GitHub’s For the Love of Code Challenge
Play Online (Hardfought)
restoHack is now available on Hardfought — no installation required.
ssh [email protected]
- Login or register (
l/r) - Select
5) Miscellaneous games - Select
$) Hack 1.0.3
Hardfought also lets you watch games in progress (w from the main menu).
Installation
Arch Linux (AUR)
yay -S restohack
Download Pre-built Binary (Linux)
Download the static binary from Releases:
mkdir -p ~/Games/restohack
cd ~/Games/restohack
tar -xzf restoHack-*-linux-x86_64-static.tar.gz
./run-hack.sh
Note: As of v1.1.1, we provide separate binary and source tarballs instead of hybrid packages.
(static binary, no dependencies required)
Also available on itch.io — no compiling required.
Build from Source
Requirements: git, cmake, a C compiler, ncurses
git clone https://github.com/Critlist/restoHack.git
cd restoHack
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build
cd build && ./hack
Alternative (if your system supports CMake presets):
cmake --preset=release && cmake --build build
For BSD systems, development builds, IDE integration, and troubleshooting: see Build Instructions
Raspberry Pi Pico (RP2040)
Hack 1.0.3 runs bare-metal on the Raspberry Pi Pico via
rp2040-console, a minimal
terminal platform for the board, ported by @neuhaus.
Prebuilt hack.uf2 and hack-volume.uf2 images are attached to the
v1.1.8 release
(checksums in SHA256SUMS-pico.txt); hold BOOTSEL and copy each file to the
board in turn. See the
restoHack recipe
for build and flash instructions.
Windows (Work in Progress)
A windows-port branch exists targeting MSVC and MinGW64 using PDCurses.
The MinGW build currently compiles but is not yet playable. Build system details and testing are still in progress.
The long-term goal is a simple Windows build so people curious about early roguelike and Hack history can experience the game without needing a Unix terminal. A free Steam release is planned once the Windows build is stable.
Current Status
v1.1.8 — Stable Release
Fixes from a community code review (a level-placement hang, a double close(), unreachable panic() guards), save/restore memory leaks, waiting out a too-small terminal instead of exiting, and an optional qwertz key layout. See CHANGELOG.
Recent Fixes
- aarch64 Crash – Fixed segfault after character selection on aarch64 Ubuntu (reported by @Filipsys)
- Save System Safety – Version 2 save format with pointer serialization
- Ubuntu Fix – Resolved PATH resolution bug preventing game launch on Ubuntu 22.04/24.04
- Hardening – Made 151 char-typed array subscripts safe, fixed a format-string bug and privilege-drop handling, and added bounds checks
- Terminal Resize – Added SIGWINCH handler to prevent display corruption on window resize
- Overflow Guards – Defensive caps on strength arithmetic (spinach/potions); the original math already stays within range in normal play
Preservation Philosophy
Fix what breaks, preserve what works.
Source Code
Built from Andries Brouwer's Hack 1.0.3 (1985) preserved in FreeBSD's games collection. Original source in docs/historical/original-source/
See CODING_STANDARDS.md for how changes are documented.
Full history: HISTORY_OF_HACK.md
Historical Research
protoHack restores Jay Fenlason's original 1981-82 source code (preserved by Brian Harvey and published by Dan Stormont as fenlason-hack) and conducts primary-source research into Hack's origins. restoHack is the stabilized restoration of Brouwer's Hack 1.0.3 with curated history. The docs/research/ directory is the shared evidence base maintained across both projects.
Gameplay
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.
Contributing
Bug fixes, portability patches, packaging help—welcome. Want to port to Plan 9? Go for it. Just document changes and respect the code.
Acknowledgments
Thanks to K2 for hosting restoHack on Hardfought and keeping the roguelike public server tradition alive.
License
3-Clause BSD. Do what you want, just don’t sue me. See LICENSE.