Soft or Hard
Reaching the pad isn't the same as landing on it. Check the speed at the moment of contact: slow enough is a soft landing, too fast is a crash. Now how you flew the last few rows is the whole game — and each ending gets its own screen.
The lander touches the pad — but a gentle set-down and a full-speed smash look identical so far. What separates them is one number: the speed at the instant of contact. Come in slow and it's a landing; come in fast and it's a crater. So test the velocity at touchdown and give each outcome its due.
10 POKE 53281,0:PRINT CHR$(147)
20 C=20:Y=1:V=0:G=0.02:TH=0.06
25 GOSUB 600
30 R=INT(Y)
40 POKE 1024+R*40+C,81:POKE 55296+R*40+C,1
50 GOSUB 500
60 FOR D=1 TO 30:NEXT D
70 POKE 1024+R*40+C,32
80 V=V+G
90 GET A$:IF A$<>"" THEN V=V-TH
100 Y=Y+V
110 IF Y<1 THEN Y=1:V=0
120 IF Y>=21 THEN 200
130 GOTO 30
200 IF V<0.3 THEN 300
210 PRINT CHR$(147):POKE 53281,2:POKE 646,1
220 PRINT "CRASHED!":PRINT "CAME IN TOO FAST.":END
300 PRINT CHR$(147):POKE 53281,5:POKE 646,1
310 PRINT "SOFT LANDING!":PRINT "A CLEAN TOUCHDOWN.":END
500 POKE 646,1:PRINT CHR$(19);"SPEED:";INT(V*100);" "
510 RETURN
600 FOR I=0 TO 39:POKE 1024+22*40+I,160:POKE 55296+22*40+I,12:NEXT I
610 FOR I=16 TO 23:POKE 1024+22*40+I,160:POKE 55296+22*40+I,5:NEXT I
620 RETURN
The whole decision is line 200: IF V<0.3 THEN 300. When the lander reaches the ground, the
program checks how fast it was still moving. Under the threshold and it jumps to the soft-landing
screen at line 300 — green, with SOFT LANDING!. Over it, and it falls through to line 210's
crash — red, with CRASHED!. One comparison, two endings, decided entirely by how well you flew
the last few rows.
That threshold is the balance of the game, and it's yours to tune. Set it too low and no landing is ever soft enough; too high and you can slam down carelessly. The value here asks for a real final burn — a careful pilot, braking hard near the pad, just makes it. That's the heart of risk and reward: gravity has been building your speed the whole way down, and the landing is the moment you must have spent enough thrust to have paid it off.
Try this
- Tune the threshold. Change the
0.3on line 200. A smaller number demands a feather-soft touch; a larger one forgives a harder one. Find the value where landing feels earned. - Read your speed. Watch the SPEED reading in the last few rows. Get it low before you touch and you land; let it climb and you crash. The number tells you your fate before the ground does.
What's next
You can land or crash — but thrust is free, so there's no reason not to brake the whole way down. In Unit 6, fuel runs out, and every burn becomes a choice. The finished game.