DEFLECTOR

by Andrew Smith



Removing blocks with a ball sounds easy, doesn't

it? Try this game and see just how wrong you can be!



Deflector is a game for the Spectrum 16 or 48K. The aim of the game is

to remove the blocks (Graphic As) from the screen by rolling over them

with your ball (Graphic B). The only way to change the direction of

your ball is to place "slashes" in its path - these are the division

symbol (sym. shift and V) and the back slash (E mode shifted D). Each

of these will cause a 90 degree change of direction. If you get stuck

in a loop you can remove all the slashes on the screen by pressing

SPACE: this will also rearrange the positions of the blocks.



The Program



The program is arranged such that every task that the computer

undertakes is written in a subroutine of its own. The game loop starts

at line 8015 and consists of several GO SUBS and one GO TO which

repeats the loop. The UDG loader should be typed in first and then

RUN. It should then be NEWed. Line 9900 of the main program should be

typed in first to allow saving of the program and the UDGs at the end

of each session. The rest of the listing should then be typed in. The

program should be saved by "GO TO 9900" as this saves the program to

autorun at the correct point and also saves the UDGs with automatic

verification.



What's Your Score



The reckoning of the score is based on the following formula:



no. of blocks x 10 - (no. of slashes

+ no. of rubbed out slashes x 5)



Anything over 0 is quite good! The game is difficult when both high

numbers of blocks or low numbers are used; the easiest game is in the

25-65 range.



Take note



One problem I encountered and was unable to solve was that after

placing a new slash and acting on it a block in the next character

position to the slash in the new direction of travel is ignored,

however it is picked up on the return journey.



In programming this game I have adopted a "modular" approach; this

means that every task that the computer has to undertake is written in

a subroutine of its own. The game loop starts at 8015 and consists of

several GO SUBS and one GOTO which repeats the loop.



The UDG loader should be typed in first and then RUN, It should then

be NEWed. Line 9900 of the main program should be typed in first to

allow saving of both the program and UDGs at the end of each session.

The rest of the main listing should then be typed in.



The program should be saved by "GO TO 9900" as this saves the program

to autorun at the correct point and also saves the UDGs with automatic

verification.



[Yes, I know that the last few paragraphs just repeat what was said earlier]

[but that's what was printed in the magazine.                          JimG]

