Lunar Lander predates the Vic 20 by many years. I remember goofing around with this on a DECwriter after writing the program in BASIC, then using up all of the tractor-feed paper playing it.

I had gravity set as an input variable, but most versions of this game has it set to 5 meters/sec^2. It was fun pretending you were landing on the event horizon of a black hole with gravity set at 65538 meters/sec^2, but I digress.

To set up the BASIC program, you had to use the following equations:


H = Hinitial + Vinitial * T + .5 * A * T^2

V = Vinitial + A * T

V = SQR( Vinitial^2 + 2 * A * H )

where:
 H = Height
 V = Speed
 T = Time
 A = Acceleration due to gravity
and:
 Initial Height = 500 meters
 Initial Speed = -50 meters/sec^2
 Fuel on board = 200 units
 Acceleration due to gravity = 5 meters/sec^2

I'll leave it up to you to write the program, as it's a good exercise in logic for new programmers. If you do write a new version, please add it to this node. I have a version that runs on a TRS-80, stored on cassette tape. Ah, those were the days...