Skip to content
Spectrum · BASIC · Game 04 BASIC ● 6 of 6 units live

Reflex

A reaction tester — wait for the signal, press a key, see your time. Your first game built around real-time input: INKEY$, polling the keyboard without ever stopping.

Reflex is a reaction tester. A telegraph bar fills, the screen flashes red, and you press any key as fast as you can. Your time appears with a verdict — Lightning, Quick, OK, or Slow.

Black ZX Spectrum screen: the bright title REFLEX, the line Your time: 5, and Quick! in cyan below
Where you are headed: press the instant the screen flashes, and the game rates your speed.

Every game so far has waited politely while you typed. INPUT stops the program dead until you press Enter — fine for a question, useless for a reaction test. Reflex has to watch the keyboard while the program keeps running. That is the one genuinely new idea here: INKEY$, the Spectrum's real-time input. Meet BASIC held it back on purpose — it only earns its keep in a game like this one.

Everything else, you already have. You drew with PLOT and DRAW in Meet BASIC; here they build a bar that fills with suspense. You changed PAPER and rang BEEP there too; here they become a signal you react to. Reflex is where those pieces stop being demonstrations and start being a game.

What you will build:

  • INKEY$ — polling the keyboard without stopping the program (the new core)
  • A loop counter that measures reaction time — lower is faster
  • A colour-coded verdict, from Lightning to Slow
  • A telegraph bar that fills to a random length — PLOT/DRAW as suspense
  • A red PAPER flash that fires the round, with sound on every beat
  • The design concept: real-time input — the program reacts to you, live

6 units. About 4–6 hours. This builds on Meet BASIC — start there if you haven't.

Unit roadmap

Phase 1

The reaction core

Real-time input, a measured time, and a verdict

Units 1–3 Complete
Phase 2

The signal

A telegraph bar and a flash that fires the round

Units 4–5 Complete
Phase 3

The game

Title, instructions, and the finished reaction tester

Units 6–6 Complete