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

Falling

Gravity pulls the lander down — speed accumulates, altitude drops by speed, and the loop runs without ever waiting for you. The real-time core in seven lines.

13% of Touchdown

Every game so far has waited for you — INPUT or INKEY$ paused until you acted. This one does not wait. The lander is falling the moment it starts, and the loop keeps running whether you touch a key or not. That continuous loop is the heart of Touchdown, so build its bare physics first, with no controls at all.

  10 BORDER 0: PAPER 0: INK 7: CLS
  90 CLS
 100 LET alt = 100
 110 LET spd = 0
 150 LET spd = spd + 1
 190 LET alt = alt - spd
 210 PRINT "ALT: "; alt; "  SPD: "; spd
 480 IF alt > 0 THEN GO TO 150
Black ZX Spectrum screen listing ALT and SPD as the lander accelerates downward to ALT -5
Telemetry only — with no thrust, the lander just speeds up as it falls.

Speed accumulates, position changes by speed

Three lines carry the whole simulation. Line 110 starts spd at 0. Line 150 — `LET spd = spd

  • 1— adds one to the speed *every pass of the loop*: that is gravity. Line 190 —LET alt = alt - spd` — drops the altitude by the current speed. Run it and watch the gap widen: altitude falls by 1, then 3, then 6, then 10, because the speed itself is climbing. Speed accumulates; position changes by speed. That is the simplest physics there is, and every falling, sliding, or drifting object you ever animate works the same way.

A loop that drives itself

Line 480 — IF alt > 0 THEN GO TO 150 — is the loop, and notice what is not in it: any wait for input. In Bright Spark and Hi-Lo the loop paused for the player; here it just runs, updating the world each time round. That is the shift from turn-based to real-time. (With no ground check yet, the altitude overshoots to −5 and stops — the next units add control, a floor, and a landing. First, the fall.)

Next: give the player a thruster to fight it.