The Landing Pad
The lander needs somewhere to come down. Draw a ground line across the foot of the screen and a coloured pad in its middle — the one safe place to land, marked by colour, not a label. Now the descent has a target.
A lander drifting in empty space has nowhere to go. Give it a destination: solid ground across the bottom of the screen, and a landing pad — a short, brightly-coloured stretch — that marks the one place it's meant to touch down. The descent finally has a point.
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 R=21:POKE 1024+R*40+C,81:POKE 55296+R*40+C,1: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 ground and pad are drawn once, before the loop, by the routine at line 600. Line 600 POKEs a
full row of solid blocks across the foot of the screen in grey — the ground. Line 610 overwrites
the middle stretch in green — the pad. Both use the 1024 + row*40 + col screen-RAM address and
its 55296 colour-RAM partner from Skyline, so the pad is the same colour-carries-meaning idea
you've used all along: green says "land here", no label needed.
The lander now falls toward the pad, and line 120 stops the loop when it reaches the ground (IF Y >= 21). For the moment it just stops dead on contact — soft or hard, it doesn't care. But the
stage is set: a craft under gravity, a thruster to fight it, and a target to hit. The next unit
makes the manner of arrival matter.
Try this
- Move the pad. Line 610 draws the pad from column 16 to 23. Shift those numbers to place it left or right, or widen the range for an easier target, narrow it for a harder one.
- Recolour the world. Try a different ground colour on line 600 (
9for brown,11for dark grey) or a different pad colour. The pad should always read as the obvious place to aim.
What's next
The lander reaches the pad — but crashing and landing look exactly the same. In Unit 5 the speed at touchdown decides which it is: come in soft and you land, too fast and you crash.