4 ms·
Yup, Ken and Dennis wrote an entire floating point library from scratch for the game, among other things. [1] > Also during 1969, Thompson developed the game o
by thefilmore 4y ago
Yup, Ken and Dennis wrote an entire floating point library from scratch for the game, among other things. [1]
> 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.
[1] https://www.bell-labs.com/usr/dmr/www/hist.pdf https://www.bell-labs.com/usr/dmr/www/hist.pdf
- JoeAltmaier 4y agoBrings back memories of programming in the 70s. Stuff like that was necessary all the time. Writing your own character-plotting code on a graphics terminal; wild attempts to calculate floating point (or estimate it) using every trick in the book and some you invented. 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).
- thefilmore 4y agoThe code also used a neat approximation to draw circles. Instead of using sin and cos for rotating along the edge of the circle to draw it, it simply used x (~= sin(x) for small values) and 1-x^2/2 (a Taylor series approximation derived from cos(x) = sqrt(1-sin(x)^2)), respectively.
- JoeAltmaier 4y agoI would draw circles using vectors. A vector normal to the last radii long enough to span about 7 degrees would sketch a circle that looked as good as round without drawing too many lines.