In the autumn of 1969, a few months after Apollo 11, Jim Storer, a student at Lexington High School in Massachusetts, wrote a game about landing on the Moon. He wrote it in FOCAL, the interactive language DEC had made for the PDP-8, and it ran on a Teletype: no screen, no graphics, just numbers printed on paper every ten seconds of flight.

It became one of the most copied programs of its time. DEC passed it around, David Ahl rewrote it in BASIC for his collections of computer games, and the idea of landing a craft with limited fuel went on to arcade cabinets and home computers. The version in this room is the FOCAL program, as it was typed on a PDP-8.

How to play

The game is already loaded and running when you sit down at the ASR-33. It announces itself as mission control and hands you the controls:

  • You start 120 miles above the surface, falling at 3,600 miles per hour.
  • The lunar module weighs 32,500 pounds, 16,000 of them fuel.
  • Every ten seconds the program prints the time, your altitude in miles and feet, your speed and the fuel left, and asks for K, the burn rate.
  • K is either 0 (coast) or any value from 8 to 200 pounds of fuel per second. Anything else is "NOT POSSIBLE".

Burn too early and you run out of fuel high above the surface; burn too late and you can't stop in time. When you touch down, the program reports your impact speed and judges the landing, from a perfect landing under 1 mph, through "good" and "poor" ones, to a crash that leaves you with five hours of oxygen, or a new crater.

Then it asks whether you want to try again. Type YES or NO.

Why it plays like this

The physics is honest. The program models the falling mass of the module as fuel burns, the Moon's gravity and the rocket's thrust, and works out each ten-second step with series expansions, all in FOCAL's floating-point arithmetic, on a machine with 4,096 words of memory. On a 1965 PDP-8 every one of those calculations takes a noticeable moment, and in this room it takes the same moment: the emulator runs the processor at its real speed, and the Teletype prints at ten characters a second.

In the classroom

The game is a short, complete example of a simulation: state (altitude, speed, mass), a time step, and an equation of motion. Students can play it first, then read the listing in FOCAL and find where each of those lives. Its other lesson is historical: a teenager in 1969 could write a program that is still played today.

More to try

Hammurabi is the other famous FOCAL game of the period, and FOCAL itself is there to write your own.