Surely the game must have hundreds of bugs like any other game.
I found a 55 year old bug in the first Lunar Lander game
51–60 of 124 posts
Re: I found a 55 year old bug in the first Lunar Lander game
#52Re: I found a 55 year old bug in the first Lunar Lander game
#53Earlier quoted context omitted.
EDIT Personally, for clarification, I do think the code is impressive , but the above back-and-forth doesn't really explain why. --- That explanation still wouldn't mean support the assertion that writing the lander game is the part that's "impressive for a high school senior in 1967." If anything, all this explanation would show is that their having access to a computer is the "impressive" part.
It needs access to a computer, creativity, and an impressive amount of capability for a high school senior. This is 5 years before pong - you are inventing game concepts from scratch rather than standing on the shoulders of giants.
It's only impressive because very few (none?) high schools teach calculus at the level required for his implementation. High schoolers are quite capable of handling that kind of calculus, it's just that the high schools don't teach it.
Re: I found a 55 year old bug in the first Lunar Lander game
#54I wonder if this works for braking in automobiles to minimize brake pad wear.
Re: I found a 55 year old bug in the first Lunar Lander game
#55If 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…
Re: I found a 55 year old bug in the first Lunar Lander game
#56That's why old people manage to create such great things. Writing game damn
Re: I found a 55 year old bug in the first Lunar Lander game
#57Pretty 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 mention…
OP here. I see your point. But think of what's needed to create this game:
- From high school physics, you know to start with a free body diagram. There are two forces, gravity and thrust. So far, your average high school student with an A in physics should be able to do that.
- Gravity depends on the distance to the center, which of course is changing, that's the whole point of a lander. I mean, you start 120 miles up. You have to realize it doesn't change much, so can be approximated as a constant. But you've been exposed to that in physics class, so maybe you just assume it's a constant.
- How the hell does thrust work as a function of burn rate? Is the exhaust velocity higher when you burn more? In other words, considering 100 lbs/sec vs 200 lbs/sec, when you double the flow of fuel into the engine, and then you burn it, it turns into twice as much fuel in the same volume. Wouldn't it be forced out at twice the speed? Or at least a higher speed? Maybe you think of the universal gas law, PV=nRT. The volume is constant (the volume of the engine), n is doubled, R is a universal constant. So that means P or T changes, or both. Why is T, which is a function of the velocity of the molecules, constant why P is doubled? Why don't both change?
- So you talk to your Dad, who happens to be a physicist. Most high school students, even those getting an A in physics, don't have a physicist for a father who can look up the properties of rocket engines and find the Tsiolkovsky rocket equation. So a high school senior finding the rocket equation is impressive to me.
- To go from velocity to position, you need to integrate. I'm not sure your average A physics senior would think of replace the FLOG() call with a Taylor series and integrating it term by term.
- How many terms of the Taylor series do you need? Does it even converge for you? If he thought of these subtleties, that's impressive. But it's possible that young Jim didn't realize these issues and just uses 5 terms because that seemed like a lot of terms.
- So now you can simulate it in near the moon. Cool! But how do you detect when it hits the ground? You could try to solve for altitude equals zero, and see if there are zero or more solutions. But even if there are solutions, they might be in the past or the future. So instead you decide to look where the velocity is zero, since you know this happens exactly once during the turn. I think that shows some ingenuity there, although I don't know if that was 18 year old Jim's thought process.
- So you try to invert the rocket equation: given a desired delta-V, how much fuel do you need to burn to achieve it? If you try this with pencil and paper and high school math, including Calculus, you keep getting stuck. You don't have the tools to show that it's actually impossible and needs you to introduce a new function, the Lambert W.
- So maybe you give up, or maybe your physicist Dad helps you again. Using your Taylor series, you now have to solve a 5th degree polynomial. So you decide to scrap the 3rd, 4th and 5th term to get yourself a quadratic. Why is it ok to scrap these now, when it wasn't ok when computing the regular dynamics? I'm impressed that he realized he can use different levels of approximation in different circumstances, without it generating some inconsistencies or other problems.
- You somehow figure out how to use the alternate form of the quadratic equation, which means you didn't just look it up and type it in. Possibly impressive.
Re: I found a 55 year old bug in the first Lunar Lander game
#58Earlier quoted context omitted.
It needs access to a computer, creativity, and an impressive amount of capability for a high school senior. This is 5 years before pong - you are inventing game concepts from scratch rather than standing on the shoulders of giants.
> and an impressive amount of capability for a high school senior It's only impressive because very few (none?) high schools teach calculus at the level required for his implementation. High schoolers are quite capable of handling that kind of calculus, it's just that the high schools don't teach it.
It's easier to be the second person to do something.
Re: I found a 55 year old bug in the first Lunar Lander game
#59I 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.
Re: I found a 55 year old bug in the first Lunar Lander game
#60Surely the game must have hundreds of bugs like any other game.
Applications were also still measured in bytes (the idea of the average program being so large that everything needed to be described in kilobytes was still in its infancy). So you literally didn't have enough space to hide 100 bugs that would linger unnoticed for 55 years: 100 bugs would be your entire source code. In fact, here's the source code for the game in the article: https://www.cs.brandeis.edu/~storer/LunarLander/LunarLander/... - it's 2027 bytes. If it had 100 bugs, or even 5, it either wouldn't run, or it would be obviously wrong.
And that source code also illustrates the kind of "game" this is: it's just a text prompt to get you to fill in the values that set up the flight, and then it runs a simulation with your parameters and spits out the result. That was enough to constitute a game people would play religiously, back in the day.
Things changed a lot since then =D