From fa5623b722bb892d349bbcc4c31cf57658ae2a23 Mon Sep 17 00:00:00 2001 From: Andrew Kesterson Date: Sun, 2 Aug 2026 13:20:34 -0400 Subject: [PATCH] Say where the collision handler is armed, and what BYE's last two verbs do A reader building chapter 17 from the text alone had to infer that COLLISION 2, BRICKHIT belongs in the setup block rather than the frame loop, and met SCNCLR and QUIT for the first time in the assembly step. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01EwxGB6TdoVvZ11KQQME9cL --- docs/17-tutorial-breakout.md | 7 +++++++ stdout.txt | 1 + 2 files changed, 8 insertions(+) create mode 100644 stdout.txt diff --git a/docs/17-tutorial-breakout.md b/docs/17-tutorial-breakout.md index 9216535..547c4de 100644 --- a/docs/17-tutorial-breakout.md +++ b/docs/17-tutorial-breakout.md @@ -861,6 +861,9 @@ Arm a handler: COLLISION 2, BRICKHIT ``` +That line goes in the setup block, once, before the frame loop starts — arming a handler is +a standing instruction, not something a frame does. + `COLLISION 2` fires when a sprite overlaps one of those rectangles. The handler runs **between source lines**, exactly like a `GOSUB` the program did not write, and must end in `RETURN`. @@ -1251,6 +1254,10 @@ SLEEP 2 QUIT ``` +`SCNCLR` clears the text screen and `QUIT` ends the interpreter; both are in +[Chapter 11](11-verb-reference.md). Turning the sprites off first matters because a sprite +is drawn over the text, and a final score behind four sprites is not a final score. + The high score is one comparison, called whenever the score changes: ```basic norun diff --git a/stdout.txt b/stdout.txt new file mode 100644 index 0000000..8aeaba2 --- /dev/null +++ b/stdout.txt @@ -0,0 +1 @@ +================================================== [##][##][##][##][##][##][##][##][##][##] [##][##][##][##][##][##][##][##][##][##] [==][==][==][==][==][==][==][==][==][==] [==][==][==][==][==][==][==][==][==][==] [--][--][--][--][--][--][--][--][--][--] [--][--][--][--][--][--][--][--][--][--] SCORE 000000 LIVES 3 LEVEL 1 HIGH 000000 B R E A K O U T PRESS SPACE TO PLAY ATTRACT MODE \ No newline at end of file