C Port of Ken Thompson's Space Travel
github.com
github.com
It emulates PDP's floating point support with 36 bit words.
// format for hand-rolled floating point used in PDP-7 version
struct flt {
char exp; // exponent
int m1; // signed 36-bit mantissa (0-18)
int m2; // 18-36
};> Also during 1969, Thompson developed the game of ‘Space Travel.’ First written on Multics, then transliterated into Fortran for GECOS (the operating system for the GE, later Honeywell, 635), it was nothing less than a simulation of the movement of the major bodies of the Solar System, with the player guiding a ship here and there, observing the scenery, and attempting to land on the various planets and moons. The GECOS version was unsatisfactory in two important respects: first, the display of the state of the game was jerky and hard to control because one had to type commands at it, and second, a game cost about $75 for CPU time on the big computer. It did not take long, therefore, for Thompson to find a little-used PDP-7 computer with an excellent display processor; the whole system was used as a Graphic-II terminal. He and I rewrote Space Travel to run on this machine. The undertaking was more ambitious than it might seem; because we disdained all existing software, we had to write a floating-point arithmetic package, the pointwise specification of the graphic characters for the display, and a debugging subsystem that continuously displayed the contents of typed-in locations in a corner of the screen. All this was written in assembly language for a cross-assembler that ran under GECOS and produced paper tapes to be carried to the PDP-7.
Add to that doing bit-banging on pins to simulate serial protocols with timing loops; storing things in odd places like the file buffer on a time-share system (used to run 20+ terminal sessions on a single 1MHz processor!) or the previous line on a programmable terminal (up-arrow and transmit-line to get it back).
Space Travel (the video game that led to creation of Unix) - https://news.ycombinator.com/item?id=12563387 - Sept 2016 (1 comment)
A video game contributed to Unix Development - https://news.ycombinator.com/item?id=9690739 - June 2015 (11 comments)
Early Unix history and evolution - https://news.ycombinator.com/item?id=4048704 - May 2012 (0 comments but top text mentions it)
The code in this repo does not show any license. The repo from which it's derived claims GPL 3.0, although the README notes: "The code in the original scans are (c) Micro Focus who own the rights to the Unix source code" (Micro Focus International having acquired Attachmate, which acquired Novell, which bought Unix System Laboratories from AT&T).
It's under a BSD-style license: http://www.lemis.com/grog/UNIX/ancient-source-all.pdf
I did find a forum in which a user stated: "[Novell's Legal Vice President] said that while Novell retains certain copyrights over UNIX, they also acknowledge and recognize the validity of certain legacy SCO/Caldera licenses regarding UNIX technologies."
https://youtu.be/EY6q5dv_B-o?t=1171
I wonder if the source code for that exists too.
replaced with sdl_getticks
now i just seea bunch of dots on a screen
i can zoom in i see a circle
i press thrust/downthrust and the circle disappears
not sure i get it
Seems scale works with ship speed to control traversing the solar systems distances:
I used this because it was recommended by the docs, but it's somewhat recent (introduced in SDL 2.0.18, November 2021).
> now i just seea bunch of dots on a screen
The dots are other planets and moons you can travel to.
> i press thrust/downthrust and the circle disappears
If the circle disappears then you've crashed into the planet (it will blink CL in the bottom right). You'll have to start a new game, and thrust in the other direction this time. I've added some more information to the README about the gameplay.
Here's an hour-long, meticulously sourced, rather thoughtful video on the question:
https://www.youtube.com/watch?v=uHQ4WCU1WQc
(which naturally concludes that video games are a British invention!)