All The Fun Of The Fair Recreate the thrill and skill of the shooting gallery with Jack Knight's game for the Spectrum. The scene is a fairground booth, with a gaily striped awning at the top and a red counter with Shooting Gallery emblazoned on it in gold. Inside, nine light-coloured balls are bobbing up and down on air jets — and the game is to shoot them off. On the counter is your rifle sight, which can be moved under the air nozzle of any ball. The pointer can be moved on the sight to represent the position to be fired at. You're got 10 shots for your money, so take aim and fire. Sounds easy? Try it! You aim using the cursor keys, and use zero to fire. A counter displays the score and high score. If you want another game, just clear the screen, and a new game should start almost immediately. My main problem in designing this game was how to stop a ball, once destroyed, from reappearing. This was overcome by using DIM, and changing the appropriately-numbered string in the PRINT statement from a ball graphic to a blank space. The only user-defined graphics used are for the balls and one of the five parts of the main sight. I've converted the binary numbers to decimal to save the tedium of BINing. The balls are GRAPHICS + A; the parts of the rifle sight, GRAPHICS + B. Variables a,b,c line positions of the balls (3 to a variable) aa,bb,cc allow for a, b,c to be +1 or -1 e column position of rifle sight g line position of pointer DIM q() identifies the individual ball (for removal from game) s score j shots k,l,m store previous ball position for the blotting-out d random reversal of balls i avoids a series of e+l's n,p,q control variables p How it works REM statements clearly identify the component parts 100-220 continuously print (and blot out) the balls, reverse their direction at top and bottom and, where specified by RND, use INKEY$ to jump to sub-routines. 400-470 count number of shots and if 10 exceeded jump program to end; check by ATTR whether a character space fired at is empty; if not there must be a ball there, so reduce the bal string to nil, increase the score and, if the maximum of 45, jump to the end routine. 700-830 set the scene, make provision for score and high score. 1000-1800 assign variables. 1900-1920 print the rifle sight and pointer in a sub-routine to avoid re-printing each time the main loop is gone through. 2000-2600 create the graphics, assigning the ball to A and the part of the rifle sight to B. 3000-3300 at game end print comment on the score. 4000-4800 offer a new game and, if accepted, deal with high score, clear the screen as necessary, take the program through the variables and the sight and pointer re-printing, to the main loop. Hints on conversion There should be no problems in conversion after a study of the documentation and the listing. -- from Home Computing Weekly, 19th July 1983