benjedwards
If anyone is curious, in 2009, I discovered that Jim Storer was the author of the first Lunar Lander game and interviewed him about it (and also chronicled the history of the game beyond that). He later provided the source code, which was awesome.

https://technologizer.com/2009/07/19/lunar-lander/index.html

My favorite part is this:

“After leaving high school I never thought about the game again,” says Storer. “Until about a couple of months ago when someone e-mailed me about this, I was completely unaware of any Lunar Lander game other than the one I wrote in high school.”

jihadjihad
Pretty cool, the offending line seems to be 08.10 [1].

I thought it was a little odd that he mentioned "impressive for a high school senior in 1969" multiple times throughout -- honestly I would imagine that growing up in the Space Age would have had a massive influence on technically minded folks, reminds me of that movie from a while back called October Sky.

In the interview in TFA with the game's author he mentions being skilled at calculus--seems to me that if you were interested in space/rocketry/etc. and had the aptitude it makes sense that you'd try your hand at programming a lunar landing game.

[1]: https://www.cs.brandeis.edu/~storer/LunarLander/LunarLander/...

sema4hacker
In the mid 70's I wrote a 2D vector graphics moon lander game for the Adage graphics terminal. You came in fast horizontally and had to use push buttons for the LEM side thrusters and main engine to slow down and land horizontally, resulting in either a crater if you were too fast, or if you ran out of fuel, otherwise you saw one or more planted American flags depending on the quality of the landing.

Years ago I threw out my only copy of the source code, thinking it had no value and would never be re-used, something I regretted later when I realized how early a graphics game it was historically, and how easily it could have beeen resurrected with a simple emulation.

probably_wrong
> By 1973, it had become “by far and away the single most popular computer game.”

On Lunar Lander and bugs: my first programming book had a version of this game in Basic that I never got to run correctly. 25 years later I came back to it and I was surprised at the ridiculous amount of bugs it had and the convoluted logic ("440 IF <condition> GOTO 450").

I eventually rewrote it as an adult [1] but young me stood no chance. And to this day I wonder what happened inside that forgotten Spanish editorial that turned (almost) working code into whatever made it to the final version.

[1] https://7c0h.com/blog/new/moon_landing_in_basic.html

schiffern

  >It’s also possible to land gently, you just need to end your 14th turn with a low altitude and velocity, and then use low thrust in your 15th turn, landing somewhere after 150 seconds. It’s just the theoretical full-thrust-on-landing suicide burn, that takes around 148 seconds, that eludes us.
I expect the fuel-optimal soft landing strategy (ignored because it doesn't fit the exact form of a "suicide burn") would be to play 164.31426784 lbs/second at t=70 seconds, and then replace one of the subsequent 200 lbs/second inputs with 199.99999999 lbs/second.

The earlier you "play" 199.99999999 the better, so just use exhaustive search and select the earliest play that still achieve a soft landing.

zug_zug
It's interesting. The naive way to write this would be not use any special formulas, and just recalculate mass and acceleration each frame (based on the new mass). And to calculate intersection with the ground at each frame boundary.

I guess the idea is that the lower your frame-rate, the less accurate this approach is, or maybe the idea is it's fun to use the actual equations.

I'm curious how perceptible the difference is between the two at the original framerate.

dn3500
I was confused for a minute because I remember playing Spacewar on a PDP-1 in the 1960s and mis-remembered there also being a lander game. But there wasn't, Storer was the first. There is an interesting history here:

https://www.acriticalhit.com/moonlander-one-giant-leap-for-g...

schiffern

  >The rocket equation is what gives rise to the suicide burn being optimal
Nitpick, but this isn't strictly true.

Even if you don't count the vehicle getting lighter as it burns fuel (which is all the rocket equation does here), a suicide burn will still be optimal.

The real reason is because a suicide burn minimizes gravity loss.

https://en.wikipedia.org/wiki/Gravity_loss

readingnews
I still have a roll of punch tape, I think for a PDP11, that says "Lunar Lander" on it, and I have no idea who to give it to.
smarks
Wow, pretty amazing. I remember playing this game after somebody ported it to Wang 2200 BASIC sometime in the mid 1970s. I didn't figure out how to land it myself, but I remember being shown the technique of coasting for the first several turns before applying maximum thrust. I don't recall the term "suicide burn" though. (Or maybe that term came in later when the Kerbal Space Program became popular.)

I also remember this lunar lander game running on a couple terminals at the Lawrence Hall of Science in Berkeley, California, also in the mid 1970s. I don't know what computer it was running on though.

I never looked at the source code for this program. I had no idea how sophisticated the math was. I wouldn't have understood it anyway, as I was too young in the mid 1970s. Then again, I'm not sure I'd be able to understand it now....

jnord
I first played this game on an HP-25 calculator back in 1976, using the same formulas as the article explains.

https://www.hpmuseum.org/software/25moonld.htm

ck2
vaguely related 1962 Spacewar video game on a PDP-1 on punchout PAPER TAPE blew my mind

https://en.wikipedia.org/wiki/Spacewar%21

video of game is at 30 second but whole thing is a great watch

https://upload.wikimedia.org/wikipedia/commons/5/58/Restored...

gwab
One of the creators of Myst (Rand Miller) credited the original game with being why he got into game development in the first place [1]

Myst inspired many people to go into computer science and game development as well, so it's interesting to see how much of a snowball effect this Lunar Lander game had

[1] https://www.youtube.com/watch?v=EWX5B6cD4_4&t=1099s

csa
Oh, fond memories.

I learned BASIC programming when I was 11 in 1981 (I think that’s right) at a summer computer camp on an Apple II.

I made a simplified version of lunar lander… it was ridiculously fun to make and play.

One of my cohort mates who was in the “advanced” Pascal class is still my friend to this day.

dhosek
I remember playing a version of this on a TI programmable calculator back in the 80s. There was also a graphical version for an assortment of 8-bit computers where you could navigate over the lunar surface in search of a flat landing area.
fl7305
I played the ABC-80 version of Lunar Lander way back then. Checking today, it seems to use a simpler Euler integration instead, and a curious value for G (?)
vardump
Perhaps someone will fix contemporary game bugs in year 2500 and write a similar article.
methuselah_in
That's why old people manage to create such great things. Writing game damn
luxuryballs
I wonder if this works for braking in automobiles to minimize brake pad wear.
swayvil
That theme song. It still rattles in my head.
sigzero
It's probably why I kept crashing!
efields
Is it really a bug if it hasn't affected the integrity of the game for 55 years? ducks
HappyCoder314
[flagged]
kelsey98765431
[flagged]
ghdhhdh
[flagged]
Kiro
Surely the game must have hundreds of bugs like any other game.