A lunar landing game for the ZX80. Each turn shows the time, altitude, speed (also in km/h, up or down) and fuel left, and asks how many liters to burn, from 0 to 75. Burning 5 liters holds your speed; less lets the Moon’s gravity pull you faster, more slows you. Touch down at 20 km/h or less to land safely; hit the surface faster and you crash. Running out of fuel sets off the tank-empty alarm.
After a landing or a crash the program offers another try. Asking for more than 75 liters prints the maximum. The article gives the starting altitude as 2,530 meters, but line 60 sets 2350.
Published in Syntax September 1981 (Landing a LEM on the Moon).
Source Code
30 CLS
40 LET M=75
50 LET T=0
60 LET X=2350
70 LET V=0
80 LET L=300
130 PRINT "TIME :";T;" SECS"
140 PRINT "ALTITUDE :";X;" METERS"
150 PRINT "SPEED :";V;" M/S"
152 IF V<0 THEN PRINT "DOWN :";
154 IF V>0 THEN PRINT "UP :";
155 IF V=0 THEN PRINT "STEADY:";
156 PRINT (36*ABS(V)/10);" K/H"
160 PRINT "FUEL :";L;" LITERS"
170 IF L<0 OR L=0 THEN GO TO 2000
190 PRINT "FUEL ? ";
200 INPUT L1
205 PRINT L1
210 IF L1>M THEN GO TO 2030
230 LET L=L-L1
300 LET T=T+1
310 LET X=X+V-((5-L1)/2)
315 IF V<-6 AND X<0 OR X=0 THEN GO TO 1000
317 IF X<0 OR X=0 AND NOT L<0 THEN GO TO 1005
320 LET V=V-(5-L1)
350 CLS
360 GO TO 130
1000 PRINT "CRRRASH"
1002 GO TO 1020
1005 PRINT "TOUCH DOWN"
1010 PRINT "AT SPEED OF ";(36*V)/10;" K/H"
1020 PRINT "STILL HAVE ";L;" LITERS.";
1030 PRINT " WANT TRY AGAIN? Y/N"
1035 INPUT Z$
1040 IF Z$="Y" THEN GO TO 30
1999 STOP
2000 PRINT "ALARM TANK EMPTY."
2010 LET L1=0
2020 GO TO 1030
2040 PRINT "MAX= ";M;" L";
2050 GO TO 230Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.


