Gnashers - Michael Scott & Gavin Monk (Your Spectrum-Issue 1-Page 91) Gnashers are a rather rare breed of gremlin whose main source of sustenance seems to be the dam which holds back the water from flooding a nearby town. But the local townspeople think nothing of a wave of hungry Gnashers swooping overhead, making their way to the dam to take out another massive bite. Their confidence comes from the fact that there is a crack squadron of bombers that has so far managed to quell the threat of the Gnashers. That is, until you took charge of the planes! You control the plane under automatic pilot by pressing the L key, and to drop a bomb on some unsuspecting Gnasher you simply press the B key. Take care when releasing your deadly missile - the Gnashers fly at much lower levels than your plane's trajectory, so you have to judge very carefully when to drop the bomb so that it collides head-on with the Gnasher. When you start the game, the task is relatively simple in that the dam comprises three barriers, all of which must be eaten through before the water comes cascading through. However, once you have killed 11 of the Gnashers, the game gets a little more difficult in that the dam now has only two barriers. Again, when you have killed 11 hungry gremlins, you start all over again - this time with the dam made up of only one barrier. Now you've got to keep on your toes because even if you let just one Gnasher through it'll mean that ... glub, glub, glub ... Lines 1-170 Draw the town and the dam. The variable, ts (top score), is initially set to zero. l$ is a flag which indicates if the plane is flying. Line 70 draws the water behind the dam, and lines 80-110 draw the dam to the required thickness, denoted by the variable, dt. The last row of the dam is drawn in inverse video so that a flood can be checked tor later using the attribute function. Lines 120-170 draw the town and the ground. Finally, line 125 checks to see it you are on the last level of the game and, if so, sets dt equal to ten - to be used as a flag later in the program. Line 180 Prints the score and the current high score. Lines 269-400 Move the Gnashers. qq is a flag to check that only one bomb is on the screen at any one time. bb is the flag holding the vertical position of a Gnasher, and cc is used to hold the horizontal position, b1 is the attribute of the Gnasher's position. Lines 300-320, 370 and 385 print and remove the Gnasher once it has been bombed successfully. Line 340 checks to see if a Gnasher has managed to eat its way through to the last barrier of the dam. Line 350 checks to see if a Gnasher has reached the dam. Line 375 checks to see if the L key has been pressed and, if it has, moves the program to the 'plane' routine. Lines 409-480 Control the movement of the plane; line 420 is actually the line responsible for the movement of the plane. b$ and pp are two flags which, respectively, check to see if a bomb has been released and whether this is your first call to the bomb routine. Lines 489-520 This section of the program moves the bomb, where zz is used as the flag holding the horizontal position of the bomb. Line 495 actually prints the bomb. Line 500 checks if the bomb has hit a Gnasher and if so, increments your score, sets the flags and returns. If you should miss the Gnasher and hit the town instead, your score is decremented via line 510, the flags are set and the program returns. Linen 539-560 If a Gnasher should eat its way through the dam barrier, this section of code will make the water level behind the dam become lower and draw the water submerging the town. Lines 570-640 The end of game routine. A tune is played to signify that the game is over and you will be shown your score alongside the current top score. Lines 680-740 This routine increments the score and prints it on the screen if you have managed to get more than 100 points. Lines 760-970 This routine checks if the instructions for the game are required by the user. If not, the program moves on the user- defined graphics routine. Lines 999-1560 This area of the program sets up the user-defined graphics needed in the game. Lines 2000-3010 This routine plays a tune while waiting for the various keys to be pressed at the beginning of the program. ------------------------------------------------------------------------------ TYPE: Arcade COMMENT: This info file was typed by Jim Grimwood Downloaded from: Desert Island Disks -- http://www.image.dk/~frankie/ Maintained by: Michael Bruhn -- frankie@image.dk