Personal Computer News


Battle Stations

 
Published in Personal Computer News #053

Battle Stations

This Spectrum game from Robert Hughes of Stoke Poges in Bucks takes you back to the '40s. You take the position of a pilot in the NAF (National Air Force). Unfortunately, due to your terrible luck and awful flying skills, you have been demoted to the lowest possible rank and given the task of manning the anti-aircraft guns.

Your only hope of achieving your lost rank and status is to shoot down as many enemy aircraft as possible. To help in this task you are put in charge of the new computer assisted sighting system (codenamed Blackcurrent).

Using your intimate knowledge of computers, you are able to tinker with the program by:

a. Increasing 10 in line 2010 to allow you more time, and
b. Decreasing (or increasing) the diff in lines 6 and 9003.

These hints should allow you to reach your goal (the officers' mess) in time for dinner.

Program Notes

3 Gosub and define the graphics characters
4 Gosub and print introduction and instructions
5-9 Set up variables and screen colours
10 Gosub to draw runway and airfield
100-125 Delete the sight using x and y as the horizontal and vertical positions
130-165 Scan the keyboard and update the sight co-ordinates accordingly
180-190 Delete the enemy aircraft
195-230 Redraw the sight using UDGs (User Defined Graphics)
240-241 Fire the Ack Ack guns and check for a hit
242 Check ammo. If there is none left then go to routine for end of game
245-247 Get a new random position for the enemy aircraft and check it.
248 Make aircraft movement sound.
250 Update the horizontal position of the aircraft by the difficulty.
260 Check whether the aircraft has flown past, if so the next plane.
300-305 Print the aircraft onto the screen.
310-315 Update the screen information such as score, number of waves, etc.
999 Continue the game
1000-1040 Enemy plane hit, explosion routine. In line 1000 the two graphics characters at the end of the line are code 137 and 134. The characters at the end of 1010 are 134 and 137.
1050 Select new start position for approaching enemy.
1060-1070 Update the score according to how close the hit was.
1073 Get some more ammo.
1074 Update and check the number of shots fired.
1075-1080 Reset the border colour. Then return.
2000-2020 Plane has flown past check for ten planes.
4000-4999 Print the scenario and instructions.

Robert Hughes