A Front Door and Real Endings
A title screen to open on, and three landings that land properly — each with its own border colour and its own sound, from a triumphant fanfare to a crash buzzer.
The game runs from drop to verdict, but it starts cold and the endings are bare text. This unit frames it — a title screen with the rules — and turns the three outcomes into events, each with a colour and a sound that match the moment.
10 BORDER 0: PAPER 0: INK 7: CLS
20 LET a$ = "*** TOUCHDOWN ***": LET y = 5: GO SUB 9000
30 PRINT AT 8, 4; "Land the spacecraft safely."
40 PRINT AT 10, 4; "Hold SPACE to thrust."
50 PRINT AT 11, 4; "Land slowly or you crash."
60 PRINT AT 13, 4; "Limited fuel. Use it wisely."
70 PRINT AT 18, 4; "Press any key to launch"
80 PAUSE 0
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: BEEP 0.02, 15
170 IF spd < 0 THEN LET spd = 0
180 LET prev = alt
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; " "
240 REM Fuel bar
250 PRINT AT 2, 1;
260 FOR j = 1 TO fuel: PRINT INK 4; "*";: NEXT j
270 FOR j = fuel + 1 TO 50: PRINT " ";: NEXT j
290 IF alt > 70 THEN BORDER 1
300 IF alt > 40 AND alt <= 70 THEN BORDER 5
310 IF alt > 20 AND alt <= 40 THEN BORDER 6
320 IF alt > 10 AND alt <= 20 THEN BORDER 2
330 IF alt <= 10 THEN BORDER 7
340 IF fuel < 10 AND fuel > 0 THEN BEEP 0.02, 30
360 LET row = 20 - INT (alt / 5)
370 IF row < 4 THEN LET row = 4
380 IF row > 20 THEN LET row = 20
390 LET prow = 20 - INT (prev / 5)
400 IF prow < 4 THEN LET prow = 4
410 IF prow > 20 THEN LET prow = 20
420 PRINT AT prow, 15; " "
430 PRINT AT row, 15; "V"
440 PAUSE 3
450 IF alt = 0 AND spd <= 2 THEN GO TO 600
460 IF alt = 0 AND spd <= 5 THEN GO TO 700
470 IF alt = 0 AND spd > 5 THEN GO TO 800
480 GO TO 150
600 BORDER 4
610 BEEP 0.1, 10: BEEP 0.1, 15: BEEP 0.1, 20: BEEP 0.2, 24
620 PRINT AT 10, 8; INK 4; "PERFECT LANDING!"
630 STOP
700 BORDER 6
710 BEEP 0.1, 10: BEEP 0.1, 12
720 PRINT AT 10, 8; INK 6; "Bumpy but safe"
730 STOP
800 BORDER 2
810 BEEP 0.5, -10
820 PRINT AT 10, 8; INK 2; "CRASH!"
830 STOP
9000 PRINT AT y, (32 - LEN a$) / 2; BRIGHT 1; a$
9010 RETURN
A front door
Lines 20–80 are the title, all from earlier games: GO SUB 9000 centres "TOUCHDOWN" with the
subroutine from Oracle Stone, a few PRINT AT lines give the rules, and PAUSE 0 holds until
the player is ready. A reaction-speed game needs its rules read before the fall begins —
once the lander is dropping, there is no time to learn the controls.
Three endings, each its own event
The landing checks (lines 450–470) now jump to a routine per outcome instead of printing a bare line:
- Perfect (line 600) — a green
BORDERand a four-note risingBEEPfanfare. The reward sounds like a reward. - Bumpy (line 700) — a yellow border and two short notes. Safe, but no triumph.
- Crash (line 800) — a red border and a low
BEEP 0.5, -10buzzer. You feel the wreck.
Same three-way decision as before, but now each branch performs its result with colour and sound instead of stating it. That is the difference between a program reporting an outcome and a game delivering one — the lesson that has run through every game in this volume.
Next: a real cockpit view — a custom ship over a starfield.