Bomb-Catcher

This file is part of and Synchro-Sette March 1984. Download the collection to get this file.
Developer(s): Gene G. Buza
Date: March 1984
Type: Program
Platform(s): TS 1000
Tags: Game

Bomb-Catcher is an arcade-style game in which the player moves a cushion (pillow) left and right along the bottom of the screen to catch falling bombs. The bomb is represented by an inverse asterisk character and falls from a randomly chosen column, while the player’s cushion is moved using keys 5 and 6 (left) and 8 (right). A successful catch increments a score, and a miss triggers a brief explosion animation using bracket characters before ending the round. A high-score variable `SS` is preserved across rounds and is initialised once at line 9997 during the SAVE sequence, so it persists for the session but resets each run.


Program Analysis

Program Structure

The program is organised into clear functional phases:

  1. Title/splash screen (lines 0–4): displays a bordered title panel in inverse video and a brief instruction text, then pauses.
  2. Initialisation (lines 5–9): clears the screen, sets pillow position N=15, score S=0, bomb column Q=0, and seeds the random number generator.
  3. Main game loop (lines 10–130): picks a random bomb column, animates the bomb falling row by row while reading the keyboard and moving the cushion.
  4. Miss/explosion branch (lines 200–290): plays a short explosion animation if the catch fails, then falls through to the end-of-game screen.
  5. End-of-game screen (lines 140–190): displays score and high score, then loops back to re-initialise.
  6. Save/initialisation footer (lines 9996–9999): a conventional ZX81 pattern — SS is set to 0 at line 9997 only during the SAVE-time RUN, ensuring the high-score variable exists without resetting it on subsequent plays.

Display and Graphics

The title screen (line 2) uses inverse-video characters rendered via the %X escape to spell out “BOMB-CATCHER” and a decorative border. The bomb itself is printed as %* (inverse asterisk) at the current row and column during the fall loop, with the previous position erased by printing a space one row above (line 60). The cushion uses the block graphic sequence \:.\.: (approximately ▌▄▌▄▌), printed at row 21.

The explosion animation (lines 205–260) uses two nested loops: an outer repeat loop (J, 3 iterations) and an inner loop (K from 0 to −4 step −1) that spreads bracket pairs outward from the impact column, printing and immediately erasing each character to create a flickering effect.

Key BASIC Idioms

  • Erase-by-overwrite: the bomb trail is erased by printing a space at row I-1 (line 60) rather than using CLS, keeping flicker to a minimum.
  • INKEY$ inside a FOR loop: lines 70–110 read INKEY$ on every row iteration. If no key is pressed (M$=""), NEXT I is executed immediately via line 80, advancing the bomb without moving the cushion.
  • Boundary clamping: lines 102–103 clamp N to the range 0–28, preventing the cushion from walking off the screen edges.
  • High-score persistence idiom: SS is never reset inside the main game loop. It is initialised once at line 9997 and maintained across rounds via lines 160–170.
  • FAST/SLOW switching: line 1 sets FAST mode for the title rendering; line 15 switches back to SLOW for the animated game loop, which is the normal ZX81 pattern for mixing display-intensive and animation code.

Collision Detection

Collision is tested at line 120: a catch is registered if Q=N or Q=N-1. Since the cushion graphic occupies roughly two character columns and the bomb falls at column Q+2, this simple two-position test is an approximation. It does not account for the full width of the cushion graphic (six characters), so the effective catch zone is narrower than the displayed cushion.

Boundary and Flow Anomalies

LineIssue
200IF Q>25 THEN GOTO 140 — if the bomb landed near the right edge (column >25), the explosion animation is skipped entirely and the game jumps straight to the score screen. This prevents the explosion graphics from printing off-screen, but the transition is abrupt.
102The right-boundary clamp sets N=28, but the cushion graphic is six characters wide; at N=28 it will overflow the 32-column screen.
125The miss branch at line 125 uses Q<>N AND Q<>N-1, which is the exact logical complement of the catch condition at line 120. Both conditions are evaluated unconditionally, so on every loop iteration either line 130 (catch) or line 125 (miss) will redirect control — line 130 does not fall through to 140 on a catch.
220–250The explosion loop prints a character and then immediately overwrites it with another character in the same PRINT statement (e.g. PRINT AT 21,Q+2+K;"(";AT 21,Q+2+K;"<"), meaning only the second character is ever visible. The intent appears to be an alternating flash, but the first character is never displayed.

Content

Appears On

Cassette to accompany the March 1984 issue of Synchro-Sette.

Related Products

Related Articles

Related Content

Image Gallery

Bomb-Catcher

Source Code

   0  % %B%O%M%B%-%C%A%T%C%H%E%R%                   % %W%R%I%T%T%E%N% % % %B%Y%                   % % %G%E%N%E% % %B%U%Z%A% % 
   1 FAST 
   2 PRINT AT 5,8;"\@@\!!\!!\!!\!!\!!\!!\!!\!!\!!\!!\!!\!!\!!\!!\@@";AT 6,8;"\@@% %B%O%M%B%-%C%A%T%C%H%E%R% \@@";AT 7,8;"\@@\;;\;;\;;\;;\;;\;;\;;\;;\;;\;;\;;\;;\;;\;;\@@"
   3 PRINT AT 10,3;"YOU ARE PULLING A PILLOW TO     CUSHION THE BOMBS THAT ARE      CONSTANTLY BEING DROPPED.",,,,,"    TO MOVE YOU PRESS THE           5 (LEFT) OR THE 8 (RIGHT)"
   4 PAUSE 40000
   5 CLS 
   6 LET N=15
   7 LET S=0
   8 LET Q=0
   9 RAND 
  10 LET Q=INT (RND*29)
  15 SLOW 
  20 PRINT AT 2,0;"                                "
  25 REM PRINT AT 2,0;"                                ";AT 21,15;" \:.\.: "
  30 PRINT AT 2,Q;" \:'\;;\':"
  40 FOR I=3 TO 21
  50 PRINT AT I,Q+2;"%*"
  60 PRINT AT I-1,Q+2;" "
  70 LET M$=INKEY$
  80 IF M$="" THEN NEXT I
  90 IF M$="8" THEN LET N=N+1
 100 IF M$="5" THEN LET N=N-1
 102 IF N>28 THEN LET N=28
 103 IF N<0 THEN LET N=0
 105 PRINT AT 21,N;" \:.\.: "
 110 NEXT I
 120 IF Q=N OR Q=N-1 THEN LET S=S+1
 125 IF Q<>N AND Q<>N-1 THEN GOTO 200
 130 GOTO 10
 140 CLS 
 150 PRINT AT 8,4;"YOUR SCORE IS: ";S*10
 160 IF S*10>SS THEN LET SS=S*10
 170 PRINT AT 12,4;"%H%I%G%H %S%C%O%R%E %I%S ";SS
 180 PAUSE 40000
 190 GOTO 5
 200 IF Q>25 THEN GOTO 140
 205 FOR J=1 TO 3
 210 FOR K=0 TO -4 STEP -1
 220 PRINT AT 21,Q+2+K;"(";AT 21,Q+2+K;"<"
 230 PRINT AT 21,Q+2+K;" "
 240 PRINT AT 21,Q+2-K;")";AT 21,Q+2-K;">"
 250 PRINT AT 21,Q+2-K;" "
 260 NEXT K
 270 NEXT J
 280 CLS 
 290 GOTO 140
\n9996 STOP 
\n9997 LET SS=0
\n9998 SAVE "BOMB-CATCHE%R"
\n9999 GOTO 1

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.

Scroll to Top