Skip to content
Game 2 Unit 3 of 5 1 hr learning time

Sound That Means Something

The border shows how close. Now sound shows which way. A low beep says go higher, a high beep says come down — and a four-note fanfare crowns the win. Feedback you hear, not read.

60% of Lucky Number

Colour tells you how close. Sound can tell you which way — and crown the win. You met BEEP in Meet BASIC; here it carries meaning.

  10 BORDER 0: PAPER 0: INK 7: CLS
  20 RANDOMIZE
  30 LET n = INT (RND * 100) + 1
  40 LET c = 0
  50 INVERSE 1: PRINT AT 2, 0; "   *** LUCKY NUMBER ***          ": INVERSE 0
  60 PRINT
  70 PRINT "I'm thinking of a number"
  80 PRINT "between 1 and 100."
  90 PRINT
 120 INPUT "Your guess: "; g
 130 LET c = c + 1
 140 LET d = ABS (g - n)
 150 IF d > 50 THEN BORDER 1
 160 IF d > 25 AND d <= 50 THEN BORDER 5
 170 IF d > 10 AND d <= 25 THEN BORDER 6
 180 IF d > 5 AND d <= 10 THEN BORDER 2
 190 IF d <= 5 THEN BORDER 7
 200 IF g = n THEN GO TO 300
 210 IF g < n THEN PRINT "Too low!": BEEP 0.1, -5
 220 IF g > n THEN PRINT "Too high!": BEEP 0.1, 5
 230 GO TO 120
 300 BEEP 0.1, 10: BEEP 0.1, 15: BEEP 0.1, 20: BEEP 0.2, 24
 310 PRINT "Got it! The number was "; n
 320 PRINT "You found it in "; c; " guesses."

Lines 210 and 220 gain a BEEP after their message, and the win now jumps to line 300 — a fanfare — before the "Got it!" text.

ZX Spectrum beeper · BEEP
A low beep (go higher), a high beep (come down), then the win fanfare

Direction in a tone

The trick is the pitch. BEEP 0.1, -5 plays below middle C — a low note for "your guess was too low, go higher." BEEP 0.1, 5 plays above — a high note for "too high, come down." Low means up, high means down: the pitch points the way, and after a guess or two your hand reaches for higher or lower numbers before you've read a word.

Line 300 is the reward: BEEP 0.1, 10, 15, 20, 0.2, 24 — four notes climbing an octave, a quick fanfare that says you did it the instant you win.

ZX Spectrum win screen: the guess trail, then 'Got it! The number was 42' and 'You found it in 3 guesses.'
The win — heard as much as seen. The fanfare plays the moment the guess matches.

Three channels now

The game speaks three ways at once: words (direction, explicit), colour (distance, peripheral), and sound (direction and victory, immediate). None of them is the game — the game is the guess — but together they make guessing feel like something. That layering of feedback is what separates a program that works from a game you want to play.

Next: an opening that invites the player in, and a win screen that frames the result.