Interpreter and Compiler Project

Lunar Lander

Designed in 1969 and inspired by the Apollo moon landings, the Lunar Lander game puts you in control of the lander module as it makes its descent to the moon. With limited fuel you must decide how much thrust to apply and when, in order to bring the spacecraft down safely.

The lander begins its descent at a set altitude and descending at a set speed, both of which are in abstract units: call them metres or yards if you like. Time is split into abstract turns, and at each turn you decide how much thrust to apply. 1 thrust costs 1 fuel and slows the descent by 1, but you're fighting against gravity which increases descent speed by 5 each turn. Your speed needs to be less than 5 when you touch down to avoid a crash.

While Lunar Lander is the simplest of all the programs, it is quite good fun to play. There is a strategy to bringing the lander down safely, and the game has replay value until you finally discover it. As there is no randomness in the game, once you've discovered the secret you'll probably want to move onto something else.

Due to its simplicity, Lunar Lander is the ideal first program to look at to see how games can be made in Tiny BASIC. Like all the example programs, it uses the comments and optional line numbers to make the program clearer, but the lines are so numbered that you can use the --output=lst option to turn the program into a more traditional style of BASIC.

Filename: lander.bas.

Next: Hunt the Hurkle


New Comment

Yes No