St
C port of Ken Thompson's Space Travel
Install / Use
/learn @mohd-akram/StREADME
Space Travel
This is a C port of Ken Thompson's
Space Travel,
ported from PDP-7 assembly. The original source files are in src/cmd/st*.s
in the pdp7-unix repository. The game
is available to play online via WebAssembly.
Install
The SDL3 library is required.
Run make to build st.
Run make install to install to /usr/local/bin.
Run make wasm (requires Emscripten) to build a
WebAssembly version of the game. To play it, launch a web server via
python3 -m http.server -d html and go to http://localhost:8000.
Controls
| Key | Action | |-----|--------------| | 1 | Quit | | 2 | New game | | 3 | Thrust down | | 4 | Thrust up | | 5 | Yaw right | | 6 | Yaw left | | 7 | Scale up | | 8 | Scale down |
You can also use the arrow keys for yaw and scale.
Gameplay
For controls, there were several buttons: jet forward, jet back, turn left, turn right; go up scale on the display, go down scale. The acceleration of the ship was fixed, but it scaled with the display scale--it was thus fixed in terms of pixels/sec/sec. Normally the ship was in the center of the screen and always pointed up; the display showed the plan view of the solar system, so that the "rotate" controls rotated the solar system around you on the display.
No relativity; scale up enough and you travel to Pluto in a few seconds. But don't scale up too much, or you might not find the Solar System again without restarting.
The object of the game was simply to fly around, get into orbits, land. "Land" meant to cross the surface with a small enough speed.
Space Travel: Exploring the solar system and the PDP-7 by Dennis Ritchie
The current dominating attractor, scale, and landing status (L/CL for landed/crash landed) are displayed at the bottom. The moving dot on the line below the main view represents the horizontal velocity relative to the current dominating attractor.
Related Skills
node-connect
342.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
84.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
342.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
84.7kCommit, push, and open a PR
