- Rust 89%
- Python 5.9%
- CSS 4.4%
- Dockerfile 0.3%
- Shell 0.2%
- Other 0.2%
|
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Signed-off-by: David Pollak <feeder.of.the.bears@gmail.com> |
||
|---|---|---|
| data | ||
| docs | ||
| images/rooms | ||
| scripts | ||
| src | ||
| static | ||
| tests | ||
| .gitignore | ||
| .woodpecker.yml | ||
| Cargo.lock | ||
| Cargo.toml | ||
| Dockerfile | ||
| index.html | ||
| LICENSE | ||
| README.md | ||
| rebuild.sh | ||
| Trunk.toml | ||
Retro Adventure
A full port of the 1976 Colossal Cave Adventure as an interactive FORTRAN-to-Rust tutorial.
What Is This?
Retro Adventure is a faithful re-implementation of Will Crowther and Don Woods' Colossal Cave Adventure (1976) — the game that launched interactive fiction, inspired Zork and Infocom, and helped shape computing culture. The original was written in FORTRAN IV for a PDP-10 mainframe. This version is written in Rust, compiled to WebAssembly, and runs in your browser.
But it is more than a game port. Every room in the cave is paired with a side-by-side comparison of the original FORTRAN code and its Rust equivalent, plus a "Machine Room" essay about the computing history behind the code. As you explore the cave, you explore the evolution of programming languages — from COMMON blocks to modules, from GOTO to pattern matching, from 36-bit mainframes to WebAssembly.
Quick Start
Docker
# Build the WASM release
trunk build --release
# Build and run the container
docker build -t adventure-cave .
docker run -d -p 8080:80 adventure-cave
Open http://localhost:8080 in your browser.
Development
# Prerequisites
rustup target add wasm32-unknown-unknown
cargo install trunk
# Run with hot-reloading
trunk serve
See docs/how_to_build.md for full build instructions.
Features
- Complete 1976 Adventure: all 140 rooms, all puzzles, all treasures, dwarves, the pirate, the endgame — faithful to the Crowther-Woods original
- IBM 3270 terminal emulator: green phosphor text, blinking cursor, scanline effects, CRT glow — all in CSS
- AI-generated room illustrations: 140 unique images (512x512 PNG) created with FLUX Schnell, in a Tolkien-inspired style
- FORTRAN-to-Rust tutorial: every room shows the original FORTRAN IV code alongside its Rust translation, with a discussion of the translation
- Machine Room essays: computing history vignettes covering the PDP-10, core memory, ARPANET, timesharing, and the people who built them
- Tutorial explore mode: browse all 140 tutorials independently of gameplay, with quick-jump to 13 featured rooms
- Full save/load system: multiple named saves in browser localStorage, plus JSON export/import for portable backups
- Toggleable images: collapse the image panel for a pure text experience
- 350-point scoring: matches the original scoring system
- Runs entirely in the browser: no server-side logic, no accounts, no tracking
Documentation
- Architecture Overview — system design, component tree, data flow, module structure
- How to Build — prerequisites, development/release builds, Docker, testing
- History and Inspiration — Crowther, Woods, the ARPANET, and why FORTRAN-to-Rust
- Game Commands — complete command reference with tips for new players
- Tutorial System — how the tutorial panels, Machine Room essays, and explore mode work
- Save/Load System — localStorage saves, JSON export/import, SaveableState design
- Contributing — development setup, project structure, how to add tutorial content
- Machine Room Essays — all computing history essays as standalone Markdown
- CI (Woodpecker) — how the Woodpecker pipeline is set up and how to tweak it
Tech Stack
| Component | Technology |
|---|---|
| Language | Rust 1.94 (2021 edition) |
| UI Framework | Yew 0.21 (CSR mode) |
| Compile Target | WebAssembly (wasm32-unknown-unknown) |
| Build Tool | Trunk |
| Browser APIs | wasm-bindgen, web-sys, js-sys, gloo |
| Serialization | serde + serde_json |
| Styling | CSS (IBM Plex Mono, custom 3270 theme) |
| Images | FLUX Schnell (AI-generated, 512x512 PNG) |
| Deployment | Docker + nginx:alpine |
Credits
- Will Crowther — created the original Adventure in 1975-1976 at BBN Technologies, based on his exploration of Mammoth Cave
- Don Woods — expanded the game in 1976-1977 at Stanford, adding scoring, puzzles, dwarves, and the endgame
- The original
advent.datdata file is used with gratitude. The game has been freely copied and redistributed since the late 1970s.
License
New code in this project (the Rust source, CSS, documentation, and tutorial content) is licensed under the Apache License 2.0.
The original game content — room descriptions, messages, puzzle logic, and the advent.dat data file — originates from the 1976-1977 Crowther-Woods Adventure. This content has been freely redistributed across the ARPANET and internet since the late 1970s and is generally considered to be in the public domain, though it was never formally released under an open-source license. We use it here in the same spirit of free sharing in which it has been distributed for nearly fifty years.
Room images were generated using FLUX Schnell and are included as part of this project.