Skip to content
Game 8 Unit 3 of 8 1 hr learning time

The Dashboard and the Landing

PRINT AT pins the readouts in place instead of scrolling, a line marks the ground, and reaching it brings a verdict judged on your landing speed.

38% of Touchdown

The simulation works, but the telemetry scrolls off the screen and nothing happens when you hit the ground. Two fixes turn it into a game you can read and win: a fixed dashboard, and a verdict at touchdown.

  10 BORDER 0: PAPER 0: INK 7: CLS
  90 CLS
 100 LET alt = 100
 110 LET spd = 0
 120 LET fuel = 50
 130 PRINT AT 1, 1; "ALT:         SPD:      FUEL:"
 140 PRINT AT 21, 0; "================================"
 150 LET spd = spd + 1
 160 IF INKEY$ = " " AND fuel > 0 THEN LET spd = spd - 2: LET fuel = fuel - 1
 170 IF spd < 0 THEN LET spd = 0
 190 LET alt = alt - spd
 200 IF alt <= 0 THEN LET alt = 0
 210 PRINT AT 1, 6; alt; "  "
 220 PRINT AT 1, 18; spd; "  "
 230 PRINT AT 1, 29; fuel; "  "
 440 PAUSE 3
 450 IF alt = 0 AND spd <= 2 THEN PRINT AT 10, 8; "PERFECT LANDING!": STOP
 460 IF alt = 0 AND spd <= 5 THEN PRINT AT 10, 8; "Bumpy but safe": STOP
 470 IF alt = 0 AND spd > 5 THEN PRINT AT 10, 8; "CRASH!": STOP
 480 GO TO 150
ZX Spectrum Touchdown dashboard: ALT, SPD and FUEL pinned along the top, a line of equals signs marking the ground at the bottom
A fixed dashboard — ALT, SPD and FUEL held in place — with the ground marked below.

A dashboard, not a scroll

The bare PRINT of earlier units pushed a new line every pass, scrolling the screen into a mess. PRINT AT, from Meet BASIC, fixes that: lines 210–230 write alt, spd and fuel to the same row and columns every time, so the numbers update in place instead of marching down the screen. The trailing spaces wipe a leftover digit when a value shrinks (100 to 99). Line 130 prints the labels once, and line 140 lays a row of = along the bottom as the ground. The loop's PAUSE 3 (line 440) slows the fall to a watchable pace — without it, real-time would be real fast.

A verdict at the ground

Reaching alt = 0 now means something. Lines 450–470 judge the landing on the one number that matters — your speed at touchdown: spd <= 2 is a "PERFECT LANDING!", spd <= 5 is "Bumpy but safe", anything faster is a "CRASH!". It is the same IF-ladder you used to rate guesses in Lucky Number, but here the bands turn a physics value into a result. Land slow and you win; come in hot and you wreck. That single comparison is the point of the whole descent.

Next: stop watching numbers and start watching a ship.