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

One More Each Round

A fixed sequence is a performance; a growing one is a game. Each round, add a random panel to the array and replay the whole thing from the start. The chain lengthens by one every time — the escalation at the heart of Simon.

67% of Bleeper

A fixed sequence is the same every time — fine for a demo, no good as a game. What makes Simon a game is that the chain grows: one step, then two, then three, on and on until you slip. So each round, add a new random panel to the array and replay the whole sequence from the top.

10 POKE 53281,0
20 PRINT CHR$(147)
30 DIM PR(4),PC(4),PK(4),PF(4),S(20)
40 PR(1)=4:PC(1)=7:PK(1)=2:PF(1)=30
50 PR(2)=4:PC(2)=21:PK(2)=3:PF(2)=40
60 PR(3)=14:PC(3)=7:PK(3)=5:PF(3)=50
70 PR(4)=14:PC(4)=21:PK(4)=7:PF(4)=60
80 POKE 54296,15:POKE 54277,0:POKE 54278,240
90 FOR P=1 TO 4:GOSUB 1000:NEXT P
100 N=0
110 N=N+1:S(N)=INT(RND(1)*4)+1
120 PRINT CHR$(19);"ROUND";N
130 FOR I=1 TO N
140 P=S(I):GOSUB 1100:FOR T=1 TO 100:NEXT T
150 NEXT I
160 FOR T=1 TO 400:NEXT T
170 IF N<5 THEN 110
180 END
1000 RP=PR(P):CP=PC(P)
1010 FOR Y=0 TO 7:FOR X=0 TO 11
1020 POKE 1024+(RP+Y)*40+CP+X,160
1030 POKE 55296+(RP+Y)*40+CP+X,PK(P)
1040 NEXT X:NEXT Y
1050 RETURN
1100 RP=PR(P):CP=PC(P)
1110 FOR Y=0 TO 7:FOR X=0 TO 11:POKE 55296+(RP+Y)*40+CP+X,1:NEXT X:NEXT Y
1120 POKE 54273,PF(P):POKE 54272,0:POKE 54276,17
1130 FOR T=1 TO 200:NEXT T
1140 POKE 54276,16
1150 FOR Y=0 TO 7:FOR X=0 TO 11:POKE 55296+(RP+Y)*40+CP+X,PK(P):NEXT X:NEXT Y
1160 RETURN
A C64 screen, black background: the four-panel grid with ROUND 4 at the top and the red top-left panel lit white.
Round four: the sequence is four panels long now and replaying from the start. The red panel is lit mid-performance — each round the machine adds one and plays it all again.

The round loop is lines 110–170. Line 110, N = N+1, counts the round. Line 110's partner, S(N) = INT(RND(1)*4)+1, picks a new random panel (1 to 4 — the same die-roll formula, narrowed to four) and stores it in the next array slot. Then lines 130–150 replay the whole sequence so far, from S(1) to S(N), using the playback loop you already wrote. Line 170 loops back for another round.

Because the sequence lives in the array, growing it is just appending one value and replaying — the playback code never changes. Round 1 plays one panel; round 5 plays five; the loop handles any length. That's the escalation, and it's built from parts you already had: an array that grows, RND to choose, and the playback loop from last unit. Watch it climb — somewhere around seven steps, holding it in your head starts to slip. (For now the machine plays to itself; the player joins in next.)

Try this

  • Go further. Line 170 stops at five rounds (IF N<5). Raise it to IF N<10 and watch a ten-step sequence — far past what most people can hold.
  • Speed the climb. The FOR T=1 TO 400 pause in line 160 is the breather between rounds. Shorten it and the rounds come thick and fast.

What's next

The machine plays a growing sequence — but the player only watches. In Unit 5 you read their echo with GET, light the panel they press, and check it against the array.