Live data from Hacker News

I found a 55 year old bug in the first Lunar Lander game

martincmartin.com

11–20 of 124 posts

Re: I found a 55 year old bug in the first Lunar Lander game

#13
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.”

Re: I found a 55 year old bug in the first Lunar Lander game

#15
post #4
post #2

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 differe…

There wasn't any graphical output or any frame rate to speak of in the sense you are thinking. The output would appear printed, like this: https://www.cs.brandeis.edu/~storer/LunarLander/LunarLander/... Only updating the mass/acceleration at ten-second intervals would be wildly incorrect!

Oh, thanks. There was an arcade game called Lunar Lander and I thought that this was the exact same thing, and I guess I didn't pay much attention to the pictures.

Re: I found a 55 year old bug in the first Lunar Lander game

#16
> 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 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

Re: I found a 55 year old bug in the first Lunar Lander game

#17

I wonder if this works for braking in automobiles to minimize brake pad wear.

Automobiles are more (wear-)efficient at braking when they use the engine to brake, not the brakes, so that would probably be a better approach to automate

Re: I found a 55 year old bug in the first Lunar Lander game

#19

> 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 GOTO 450"). I eventually rewrote it as an adult [1] but young me stood no chance. And to…

Probably copy/paste errors (in editorial) mixed with deadlines mixed with no QA.

Re: I found a 55 year old bug in the first Lunar Lander game

#20
post #7

Earlier quoted context omitted.

I needed to know what language that is written in. Turns out it's something called FOCAL, as mentioned in this article about the game: https://retro365.blog/2021/12/02/bits-from-my-personal-colle... Wikipedia on FOCAL: https://en.wikipedia.org/wiki/FOCAL_(programming_language)

OP here. One interesting thing about FOCAL is that * has higher precedence than /. So in Lunar Lander, M*G/Z*K is what mathematicians and other languages would write M*G/(Z*K). I did a double take when I first saw that. :) As the Wikipedia article says, "This can cause subtle errors when converting FOCAL source code to other systems." Also, the IF syntax is a little limiting and hard to read, although I suppose progr…

Your code got munged, use backslash to escape * (otherwise it starts a span of italicised text), or use four leading blanks for code blocks (in which escaping is usually not needed):

M*G/Z*K

I think you meant, the above and

    M*G/(Z*K)
respectively.
Post reply on HN