Skip to content
Spectrum · BASIC · Game 02 BASIC ● 5 of 5 units live

Lucky Number

Turn the guessing game you built in Meet BASIC into a real game: a secret between 1 and 100, a border that runs hot and cold, sound that points the way, and a verdict at the end.

You already built the heart of this game. In Meet BASIC you wrote a guess-the-number loop — the computer picks a secret, you guess, it counts your tries. Lucky Number opens on that working game and turns it into one you'd want to play: feedback you can see, feedback you can hear, and a result that means something.

ZX Spectrum win screen with a green border, a guess count, and the rating Not bad!
Where you are headed: a win, the guess count, and a verdict — framed in green.

The game is there from Unit 1 — playable, complete. Every unit after that adds one layer that makes it feel like a game, not just work like a program: colour, sound, an offered start, a framed win, a rating.

What you will build:

  • A border that runs cold blue to burning white, by ABS distance
  • Directional sound — a low beep for "go higher", a high one for "come down"
  • A win fanfare and a green winner's border
  • An offered start with PAUSE, so the game feels invited, not inflicted
  • A rating that turns a guess count into a verdict

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

Unit roadmap

Phase 1

The foundation

The working guess game, brought over from Meet BASIC

Units 1–1 Complete
Phase 2

Feedback

Colour for how close, sound for which way

Units 2–3 Complete
Phase 3

Framing the result

An offered start, a framed win, and a verdict

Units 4–5 Complete