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

The Board

Four coloured panels, filled with PAPER and spaces and drawn by a subroutine — the stage every later unit calls on.

17% of Bright Spark

Every round of Bright Spark happens on the same stage: four coloured panels, numbered 1 to 4. Build that first. It uses only tools you have — PAPER, PRINT AT, a FOR loop — wrapped in a GO SUB subroutine so the rest of the game can redraw the board with one line.

  10 BORDER 0: PAPER 0: INK 7: CLS
 110 CLS
 120 GO SUB 540
 130 STOP
 540 REM --- Draw all panels ---
 550 PAPER 2
 560 FOR r = 2 TO 9: PRINT AT r, 1; "       1      ": NEXT r
 570 PAPER 1
 580 FOR r = 2 TO 9: PRINT AT r, 17; "       2      ": NEXT r
 590 PAPER 4
 600 FOR r = 12 TO 19: PRINT AT r, 1; "       3      ": NEXT r
 610 PAPER 6
 620 FOR r = 12 TO 19: PRINT AT r, 17; "       4      ": NEXT r
 630 PAPER 0: RETURN
Black ZX Spectrum screen: four coloured panels — red 1 and blue 2 on top, green 3 and yellow 4 below
The board: four panels in red, blue, green and yellow, each labelled with its key.

Colour from spaces

A panel is not a drawn shape — it is a block of coloured spaces. PAPER 2 (line 550) sets the background to red; the FOR r = 2 TO 9 loop then prints eight rows of spaces at column 1, and each space fills one character cell with red. Repeat in blue at column 17, green and yellow on the lower half, and you have four solid blocks. The digit sitting in each (the 1, 2, 3, 4 in the strings) tells the player which key that panel answers to. Line 630 resets PAPER 0 so nothing later prints on a coloured background.

A subroutine for the board

The whole draw lives at line 540, reached by GO SUB 540 and ended by RETURN. You met GO SUB in Oracle Stone: it runs a block of lines and comes back. The board needs redrawing at the start of the game and again on a replay, so making it a subroutine means writing it once and calling it whenever — GO SUB 540 is the whole instruction. Line 130's STOP keeps the program from running on into the subroutine by accident.

Change a PAPER number, or a FOR range, and the board reshapes. Four colours, four panels — the stage is set.