icon_Close
comments
Not seeing your comment? Read our Content Moderation Policy.
Log in or sign up to comment
icon_CheckmarkRed
Please verify your account
Resend verification email
Leave a comment
icon_Bold
icon_Italics
icon_Link
Submit

Proving Ground

The space race inspired 
my first video game_

I decided to try making my own version of Lunar Lander.

Bill profile picture

I loved how the computer forced me to think. It was completely unforgiving anytime I showed mental sloppiness. It demanded that I be logically consistent and pay attention to details. One misplaced comma or semicolon and the thing would crash.

It felt like solving mathematical proofs. Programming doesn’t require math skills (beyond the basics), but it does demand the same kind of rigorous logical approach to problem-solving. In both math and programming, I liked the process of breaking problems down into smaller, more manageable parts. And like solving a problem in algebra, there are different ways to write programs that work—some more elegant and efficient than others — but infinite ways to make a program that crashes. And mine crashed all the time.

I had to solve how a player moved the lander left and right, up and down, how much fuel it had, how fast it burned. I also had to describe what it looked like and how to display the ship in dashes and asterisks on the screen.

Unfortunately, I don’t have the code I wrote back then, but below you can play a text-only Lunar Lander based on the one written by Jim Storer in 1969—the same game that inspired me to write my own.

The Problem

You’re 120 miles above the surface of the moon, and your automated landing system has failed! You’re now in freefall and must take manual control to land safely within two minutes.

To avoid crashing, slow your descent by firing your engines. But use your fuel wisely: You only have 16,000 pounds, and if you run out before landing, you could crash.

Safely touch down a lunar lander on the moon without crashing and before you run out of fuel.

icon_Share
Share
icon_Comments
Comments
Get my newsletter
icon_ArrowBack
icon_Close
Log in or sign up
Want good news in your inbox? Become a Gates Notes Insider today to get my newsletter and receive updates on inspiring stories and remarkable heroes from around the world. You'll learn about the incredible progress being made in global health, energy innovation, and more.
Your email
Please enter a valid email address
Next
icon_Close
icon_Search
POPULAR SEARCHES