Skip to content

Night Patrol

Spectrum · BASIC

Read the patrol, use cover and escape with the file

10 units

Start with Draw the archive Browse lessons
Night Patrol course capture
Night Patrol · Spectrum

The file is across the archive. Getting there is only half the job: you must bring it back while a guard walks the corridors, looks behind at corners and checks the next passage before moving on.

Build a stealth game in Sinclair BASIC on a stock 48K PAL ZX Spectrum. The 30 × 18 map has narrow corridors, wider corners and hiding recesses. Walls stop movement and block sight. The guard’s widening field of view appears on the floor, so you can read the danger before choosing when to move. The game is silent.

Hold I/J/K/L for up, left, down and right. R retries and Q quits. On the title screen, S starts. Collect the file, then return to the entrance. There is one guard and one archive; learning the patrol is part of the game.

Build behaviour you can read

Ten lessons take us through eight runnable programs. First draw the archive, explore it and retrieve an unguarded file. Add a moving guard, then corner scans. Hold the guard still while we examine sight; prepare the changes between views; bring movement and perception together. Finish with reliable controls and a saved tape that starts in a fresh machine.

The guard follows explicit rules. Its sight is prepared as ordinary BASIC DATA, which we decode with a small worked example before using the complete table. You do not need Python or machine learning. An optional generator supports later experiments with different maps.

Variables, loops, strings and subroutines are explained where they matter. You can begin here without completing another game. For a slower introduction to keyword entry, editing and saving, use Meet BASIC.