a.k.a. “Lunar Lander”
by Jim Storer
Published: Fall 1969 (FOCAL original); January 1970 (in DECUS Program Guide); 1972 (in EDU newsletter); 1973 (in 101 BASIC Computer Games)
Language: FOCAL (1969); BASIC (1972)
CONTROL CALLING LUNAR MODULE. MANUAL CONTROL IS NECESSARY YOU MAY RESET FUEL RATE K EACH 10 SECS TO 0 OR ANY VALUE BETWEEN 8 & 200 LBS/SEC. YOU'VE 16000 LBS FUEL. ESTIMATED FREE FALL IMPACT TIME-120 SECS. CAPSULE WEIGHT-32500 LBS FIRST RADAR CHECK COMING UP
On July 20, 1969, Apollo 11’s Lunar Module Eagle touched down on the moon, though it had been a close call. With little spare fuel to begin with, pilot Neil Armstrong had needed to dodge unexpected boulders and craters to find a level spot to put down after the LEM had drifted ahead of its planned landing site. When he finally set down the delicate craft, only seconds of descent fuel remained. 17-year-old Jim Storer had been glued to the television at his family home in Massachusetts for the whole mission, and that fall he pitched a project to the teacher in charge of Lexington High’s PDP-8 computer: a game that would recreate the experience of landing the LEM on the moon.
Storer’s game printed no title, but the filename, fitting neatly into the operating system’s six-character limit, was ROCKET. The program ran to only 39 tight lines of code in FOCAL, a language that had been designed to make programming easier for students but which was rapidly losing ground against the similar BASIC, which had even clearer syntax. In the game, the player receives rows of data, one at a time, representing the elapsed time, altitude, velocity, and fuel remaining in their simulated lunar lander’s tanks, and contributes a single number each turn to the rightmost column, representing the amount of fuel to burn in the next ten-second interval.
COMMENCE LANDING PROCEDURE TIME,SECS ALTITUDE,MILES+FEET VELOCITY,MPH FUEL,LBS FUEL RATE 0 120 0 3600.00 16000.0 K=:10 10 109 5160 3616.33 15900.0 K=:25 20 99 5018 3602.905 15650.0 K=:15 30 89 4930 3609.0664 15500.0 K=:12 40 79 4709 3621.096 15380.0 K=:30 50 69 4577 3596.779 15080.0 K=:45 60 59 5030 3541.238 14630.0 K=:100
Note: various browsers and email clients might wrap these long lines, so here’s a picture of what a slightly later version would have looked like on a contemporary printout:
On timeshared systems with slow-printing teletypes, and allowing for a few seconds each turn to decide the new burn rate, the game would have given the illusion of playing out in roughly real time. To players with the ongoing Apollo program still a vibrant part of the national conversation, it would have been simple to imagine a background of echoing mission control commentary and astronaut jargon, lending the stark numeric output the vivid context of a thrillingly real-life outer space adventure, still playing out on the nation’s televisions.
The challenge of the game—and it’s quite difficult to win—is a decent analogue to Armstrong’s, though obviously simplified: you must slow your craft enough to land gracefully before running out of fuel. If you’re too cautious, the moon’s gravity slowly increases your terrifying downward velocity beyond the ability of your engines to counteract it. If you’re too aggressive, though, you can run out of fuel too early, and plummet helplessly the rest of the way down to the regolith. In either case, the tragic result is the same.
220 9 2181 218.43907 330.0 K=:
230 8 3994 254.43907 330.0 K=:
240 8 273 252.93896 230.0 K=:
250 7 1855 251.22058 130.0 K=:
260 6 3464 249.28134 30.0 K=:
FUEL OUT AT 270.00 SECS ON MOON AT 326.77 SECS IMPACT VELOCITY OF 478.22 M.P.H. FUEL LEFT: 0.00 LBS SORRY,BUT THERE WERE NO SURVIVORS-YOU BLEW IT! IN FACT YOU BLASTED A NEW LUNAR CRATER 108.56 FT. DEEP TRY AGAIN?
Like The Oregon Trail and many other contemporary programs, Storer’s is at its core a mathematical simulation. But it benefits from simulating a very human moment where the drama came almost entirely from the cold stark math of accelerations, momentums, and forces. While the core game loop consists entirely of numbers, Storer gives the simulation just enough framing to engage the imagination, maintaining the illusion that your teletype is connected to some distant mission control. The game begins with the words CONTROL CALLING LUNAR MODULE, and if you quit, politely prints CONTROL OUT before ending its execution. Other human touches, like the depth of your fail crater—calculated simply as a percentage of impact speed—serve as a gentle consolation prize to avoid humiliation in the shared spaces of contemporary computer labs: a failed run turned into jocular bragging rights.
The program’s math is sound. Storer programmed in equations for acceleration and force with the help of his teacher and his engineer father, packaging them into a few tight lines of FOCAL code. A transitional language that never caught on outside the PDP ecosystem, several FOCAL features (such as single-letter variable names but also single-letter abbreviations for function names) combined with the already-hairy calculus equations make ROCKET’s source code all but inscrutable today, except to the well-initiated:
07.10 I (S-.005)5.1;S S=2*A/(V+FSQT(V*V+2*A*(G-Z*K/M))) 07.30 D 9;D 6;G 7.1 08.10 S W=(1-M*G/(Z*K))/2;S S=M*V/(Z*K*(W+FSQT(W*W+V/Z)))+0.5;D 9 08.30 I (I)7.1,7.1;D 6;I (-J)3.1,3.1;I (V)3.1,3.1,8.1
Storer submitted his program in early 1970 to DEC, the makers of his school’s PDP-8, who added it to the library of software programs available to their customers: the DECUS Program Guide (DECUS was the DEC Users’ Society). It arrived at the perfect moment to catch an explosive crosswind of zeitgeists: Apollo fever and computer mania. Storer’s program was cloned, tweaked, improved, and reinvented countless times over the next eighteen months, so much so that by the beginning of 1972 the DECUS guide was advertising “a greatly improved version of the Apollo simulation game which has been running on almost every timesharing system in the country.” Some of these programs were independent creations; some complete rewrites of Storer’s. But a surprising number were thinly veiled rip-offs of the original ROCKET, and a great deal of the reason for that was because of its 1972 publication in a much more widely read periodical.
In 1969, educational psychology PhD candidate David H. Ahl had taken a job with DEC managing their educational marketing department. The dry DECUS Program Guide contained many programs potentially of interest to teachers and students, but they were buried in hundreds of more mundane utility and demonstration programs with exciting titles like “PDUMP - DOS Based Register/Core Dump” and “Core Load to MAINDEC Tape.” One of Ahl’s initiatives was to start a free dedicated newsletter for educational users, which he called EDU. He filled it with lesson plans, helpful instructional tips, and success stories submitted by teachers using computers in the classroom. Each issue also included several program listings in BASIC, the language DEC was increasingly standardizing on as the basis of its educational platforms, for users to type into their mainframes and run. But this meant Ahl needed to write or round up a large number of interesting BASIC programs in short order. In addition to welcoming submissions by mail, Ahl had scoured the DECUS catalog and other existing collections of source code for good programs to list in EDU. Among others, he’d found a reimplementation of the 1964 teaching experiment The Sumerian Game that had been ported to FOCAL by a fellow DEC employee. Ahl ported the program again to BASIC, and gave it the six-letter title HMRABI, or Hamurabi, destined to become another legendary early computer game.
Ahl had also stumbled across Storer’s lunar landing program, and ported it to BASIC as well. Ahl’s version keeps the core spirit of the program while tweaking its text to better explain the rules and streamlining a few of its complexities, though losing some of the original’s charm in the process: the conceit that you are communicating directly with mission control, sadly, is absent. (Ahl did add a few winking touches of his own, suggesting that the LEM’s onboard computer has failed because “it wasn’t made by Digital [DEC].”) Ahl also made some simplifications, possibly in an effort to increase the game’s clarity as a teaching tool: Storer’s original has six different gradations of landing success, for instance, while Ahl’s port has only three.
Ahl’s revised version was printed in EDU in early 1972, just as the newsletter’s readership was exploding. When the first issue had been released the previous fall, it had only 300 subscribers; but by the end of 1972, there were over 20,000. With minicomputers becoming more and more affordable for institutions, and a generous swath of private and government grants available for getting them into schools, there was an unprecedented increase in the demand for computer-based content. Ahl’s distribution of ROCKET exposed the program to thousands more users, and inspired a new wave of imitators, clones, and remakes.
Later in 1972, as the final Apollo missions were playing out, Ahl pitched to DEC the idea of taking the best programs from EDU and the DECUS Program Guide and publishing them in a book. The resulting title, 1973’s 101 BASIC Computer Games, became one of the most influential titles in early computing history. Eventually reissued as just BASIC Computer Games, it would become the first computer book to sell over a million copies. The book included Ahl’s port of ROCKET, along with two variations: one by Eric Peters which added a simple ASCII plot to each line showing your spacecraft’s altitude, and a more complex version by William Labaree II where the player controls burn time and angle in addition to thrust. Ahl called ROCKET in his notes for the book “far and away the single most popular computer game” of the time. By the end of the 1970s as the personal computer revolution was beginning, hundreds of thousands of kids and adults were typing in ROCKET to their home computers to make their own attempt at recreating Armstrong’s famous landing. In 1979, Atari released a graphical version called Lunar Lander, the name which came to stand in for the entire subgenre of games inspired by ROCKET, and further cemented its place in computing history.
While it might seem strange to discuss ROCKET in the context of “text games,” given its output is mostly numbers, it arguably succeeds at capturing the immediacy of its dramatic situation even more effectively than words do in The Oregon Trail. Rather than a remote god’s eye viewpoint as in most previous games, where the player makes detached decisions over time periods of weeks or months rather than identifying with a single viewpoint character, here you become the astronaut in the hot seat, watching the numbers printed out by your chattering teletype drop disturbingly quickly. The game encourages players to imagine themselves there, controlling from second to second whether their virtual hero lives or dies. It was an addicting kind of immersion that countless future games would strive to recreate and improve on, and one of the first text games to put the player in the shoes—or space boots—of a lone protagonist in a single moment of crisis.
190 0 581 8.10 300.0 K=:8 200 0 425 13.17 220.0 K=:10 210 0 253 10.30 120.0 K=:9 220 0 96 11.11 30.0 K=:100 FUEL OUT AT 220.30 SECS ON THE MOON AT 226.12 SECS IMPACT VELOCITY OF 9.86 M.P.H. FUEL LEFT: 0.00 LBS GOOD LANDING-(COULD BE BETTER) TRY AGAIN?NO CONTROL OUT *
Next week: The story of how a brilliant mathematician dropped in on a hippie computer commune, and created the first complex geography—not to mention legendary villain—in gaming history.
Jim Storer maintains a fascinating list of interesting ROCKET links, including a scan of the 1969 source code; you can also play an accurate recreation of the original game online. Thanks to additional reporting from FictionPhile and Technologizer.