--- title: "Hunter" id: 71078 type: "computer_media" slug: "hunter" url: "http://localhost/computer_media/hunter/" markdown_url: "http://localhost/computer_media/hunter.md" published_at: "2026-08-27T19:49:08+00:00" modified_at: "2026-08-27T19:50:12+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2026/08/hunter.png" alt: "Hunter screen" excerpt: "A hunter fires at a flying bird in this animated scene combining trajectory drawing, AY sound chip programming, and cycling border flash effects." category: - name: "Archived Media" slug: "archived-media" taxonomy: "category" url: "http://localhost/category/archived-media/" post_tag: - name: "Downloadable" slug: "downloadable" taxonomy: "post_tag" url: "http://localhost/tag/downloadable/" - name: "TS 2068" slug: "ts2068" taxonomy: "post_tag" url: "http://localhost/tag/ts2068/" model: - name: "Timex/Sinclair 2068" slug: "ts-2068" taxonomy: "model" url: "http://localhost/model/ts-2068/" indiv: - name: "D. J. Currie" slug: "d-j-currie" taxonomy: "indiv" url: "http://localhost/indiv/d-j-currie/" genre: - name: "Game" slug: "game" taxonomy: "genre" url: "http://localhost/type/game/" media_type: "Program" programmers: - name: "D. J. Currie" slug: "d-j-currie" taxonomy: "indiv" url: "http://localhost/indiv/d-j-currie/" download_url: "https://archive.org/download/timex-sinclair-software-archive/Hunter%20%28198x%29%28Currie%2C%20D.J.%29%28TS2068%29%28US%29%28Program%29.zip" tsrun_member: "Hunter (198x)(Currie, D.J.)(TS2068)(US)(Program).tap" mediadate: "198x" images: - url: "http://localhost/wp-content/uploads/2026/08/hunter.png" alt: "Hunter screen" media_type_tags: "Game" --- # Hunter Hunter is an animated hunting scene program that depicts a figure firing a gun, with a projectile traveling across the screen to strike a bird in flight. The program uses PLOT and DRAW commands to render a ballistic trajectory line, then erases it using OVER 1 (XOR mode) to simulate motion. SOUND commands configure the AY chip with envelope and tone registers for gunshot and bird-call effects. After the shot sequence, the BORDER color is cycled through values 0–6 in a repeating loop to create a flashing effect before the program loops back to the start. *** ### Program Structure The program is a single-scene animation that runs as a continuous loop. It can be broken into the following phases: 1. **Setup (lines 10–60):** Sets colors, draws a hunter figure using PRINT with OVER 1 overlays and a series of PLOTs for detail. 2. **Bird drawing (lines 70–100):** Plots a bird in flight as a small two-pixel-wide block at a fixed Y coordinate, sweeping from x=99 to x=244, then erasing the trailing pixel with OVER 1 to simulate movement. 3. **Gun firing (lines 110–130):** Draws a trajectory line with DRAW, pauses, then erases it with `DRAW OVER 1`. A SOUND command produces the gunshot. 4. **Bullet/impact animation (lines 140–210):** A loop moves a three-pixel vertical marker down the right side of the screen while playing a rising-pitch tone, simulating a falling bird. 5. **Post-shot effects (lines 220–290):** Additional SOUND calls followed by a BORDER color cycling loop (0–6, repeated 3 times) creating a flashing finale. 6. **Loop and save (lines 300–310):** Clears FLASH and BRIGHT attributes, then GO TO 10 to restart. Line 310 saves the program with autostart. ### Graphics Techniques The hunter figure at the left edge is constructed by layering characters using `CHR$ 8` (cursor left) and `OVER 1` to XOR-combine characters on screen — for example, printing `"o"` then overlaying `"//"` to form the gun or body shape. The same OVER 1 technique is used throughout to erase previously drawn graphics without clearing the whole screen, which is a standard technique for flicker-free animation on this platform. The bird animation in lines 70–100 draws a 2×2 block of pixels at each x position and immediately erases the left column with OVER 1, leaving a leading two-pixel wide dot that travels across the screen. This gives the impression of a small bird in flight without storing sprite data. The trajectory line (line 110) uses a single `DRAW 218,148` from coordinate (26,24), spanning a large diagonal across the screen. It is erased with `DRAW OVER 1;-218,-148` after a 4-frame pause, producing a brief visible shot line. ### SOUND Register Usage Several SOUND commands program the AY chip directly via register/value pairs. The key calls are: | Line | Registers set | Purpose | | --- | --- | --- | | 120 | 6,15; 7,7; 8,16; 9,16; 10,16; 12,16; 13,0 | Gunshot sound — noise period, mixer, channel volumes, envelope period and shape | | 150 | 7,62; 8,15 | Enables channels/noise for bird tone, sets channel A volume | | 180 | 0,i (i=50..100) | Sweeps channel A coarse tone register upward for a falling-pitch whistle effect | | 220 | 6,6; 7,7; 8,16; 9,16; 10,16; 12,56; 13,8 | Second sound burst — impact/thud with different envelope settings | | 240 | 8,0; 9,0; 10,0 | Silences all three channels by zeroing their volume registers | ### Notable Techniques - **OVER 1 for erasure:** Used consistently instead of redrawing over background color, preserving other screen content. - **CHR$ 8 cursor repositioning:** Allows multiple characters to be overlaid at the same screen cell within a single PRINT statement chain, building composite glyphs. - **Rising tone sweep:** The loop at lines 160–200 increments the AY tone register from 50 to 100 with a PAUSE 3 between steps, creating a smooth pitch glide synchronized with the falling-bird pixel animation. - **BORDER flash finale:** Lines 250–290 cycle BORDER through colors 0–6 three times with short pauses, producing a rapid color flash effect without using the FLASH attribute — this avoids the 50Hz cell-level flashing limitation and gives a full-screen color burst. - **Pixel-level bird motion:** The bird sweep uses individual PLOT calls rather than DRAW or PRINT, giving sub-character pixel precision for the animation path at y=172/171. ### Potential Issues Line 100 ends with `NEXT x` after the bird sweep, but the variable `x` is reused in line 250 for the BORDER flash loop without being re-declared — this is harmless since LET is not required before FOR, and each FOR resets the variable. The falling-bird animation in lines 170–200 moves the marker downward (y decrements by 3 each iteration) starting from y=172, ending near y=22 after 50 iterations, which correctly maps the bird falling off screen. ## Source Code ``` 10 REM ..Autumn..by D.J.Currie 20 BORDER 5:PAPER 5:CLS :INK 0 30 PRINT AT 19,1;"o"; CHR$ 8; OVER 1;"//" 40 PRINT " ©"; CHR$ 8; OVER 1;"H" 50 PLOT 18,14:PLOT 18,13:PLOT 19,14:PLOT 20,15:PLOT 16,18:PLOT 21,17:PLOT 24,22:PLOT 25,23:PLOT 26,24 60 PRINT AT 21,1;"H"; CHR$ 8; OVER 1;"#" 70 FOR x=99 TO 244 80 PLOT x-1,172:PLOT x,172:PLOT x-1,171:PLOT x,171 90 PLOT OVER 1;x-1,172:PLOT OVER 1;x-1,171 100 NEXT x 110 PLOT 26,24:DRAW 218,148:PAUSE 4::DRAW OVER 1;-218,-148 120 SOUND 6,15;7,7;8,16;9,16;10,16;12,16;13,0 130 PAUSE 45 140 LET y=172 150 SOUND 7,62;8,15 160 FOR i=50 TO 100 170 PLOT 244,y:PLOT 244,y-1:PLOT 244,y-2 180 SOUND 0,i:PAUSE 3 190 PLOT OVER 1;244,y:PLOT OVER 1;244,y-1:PLOT OVER 1;244,y-2 200 LET y=y-3:NEXT i 210 PRINT AT 19,30;"_"; CHR$ 8; OVER 1;"m"; CHR$ 8; OVER 1;"v":PAUSE 5:PRINT AT 19,30;" " 220 SOUND 6,6;7,7;8,16;9,16;10,16;12,56;13,8 230 PAUSE 40 240 SOUND 8,0;9,0;10,0 250 FOR x=1 TO 3 260 FOR y=0 TO 6 270 BORDER y 280 PAUSE 2:NEXT y 290 PAUSE 5:NEXT x 300 FLASH 0:BRIGHT 0:GO TO 10 310 SAVE "HUNTER" LINE 10 ```