Published in Dragon User March 1986.
A superlative maze game by the team of Dave Rogers and Colin Hogg
YES, this is a mazechase Pacman type game, but we have given it its own definite style and flavour, from the untypical use of the Dragon's resolution modes (avoiding the usual Dragon blandness) to the distinctive and devious designs of the mazes. To play, it is fast, challenging, and we believe as good as (or better than) any game of this genre available for the Dragon.
All the features expected of a good mazechase are included: multiple tunnels, power rings, mouth open in four directions, bonus fruits, a highly intelligent player-seeking algorithm, up to six 'Progressively aggressive' opponents (and bonuses for catching them!), six different screens and colours, extra lives for clearing them, and so on — yet the program is relatively short. Other main features include a control key response tailored to allow 'anticipation' when turning corners (giving much smoother play), 14 different sound effects/tunes and a fully functional demonstration mode, which also cycles through the six screens, so even if you can't clear them all yourself at least you can sit back and see what you're missing!
The only compromise we have made in the program is a slight delay between certain screens (15 secs) while video modes are altered, etc. to do this any faster would have required considerably more code.
We use a 'notepad screen' system, and this is well worth describing because the concept could usually apply to almost any micro. The game is actually played on the Dragon's low-resolution (text) screen, which is block/character mapped and folded in a simple, straight-forward way, starting at address 1024. Only those parts that change on this reference screen are translated, by means of a machine code scan, onto a hi-res 'slave screen', the latter being the only screen actually seen by the player.
By using this method, all of the game logic can be programmed using normal character codes and pokes on to a simple screen, which can also be easily peeked-at to perform collision checks, route-seeking scans, tunnel moves, etc.
Meanwhile, the viewed screen can be made as detailed as you like and its characters and colours can be switched around without affecting the actual operation of the game in the slightest! Since the notepad screen is never actually seen (unless you press Break) it doesn't matter what it looks like, so you also gain the freedom to choose characters with codes that make the programming easier. For example, we arranged all the characters that are valid or invalid (for the player or for the 'fleas' to move on to) into easy-to-differentiate numerical groups.
To update the hi-res screen we use three different machine code subroutines: While we are describing these the main machine code functions will also be covered:
(1) Exec Hiup (Hiup = 31531). This updates the entire screen, but is too slow to be used all the time because it has to scan the 32 x 16 characters on the notepad screen, then refer to the bit-pattern-tables to find the corresponding hi-res characters and poke a total of 32 x 192 bytes of these onto the hi-res screen (you can see the speed of this scan when it does a colour change 'wipe-down' between screens two and three).
(2) Exec 31565. Updates the score display only (top left). Used for example when bonus is being counted up.
(3) USR 00 (address is 31067). This calls the main machine code routine that takes care of ALL flea-movements. It moves the fleas about the notepad screen as dictated by the player-seeking-algorithm, etc, (the player's position being passed via S in Line 50) but then it also updates specific areas of the hi-res screen, these being: Each of the flea's positions/each flea's previous position (replacement characters)/the player's position/above, below, left and right of the player (so whichever way he was moving the update will rub-off his previous position), and finally, the score display. This main routine also does the following: scans the screen for dots to see when it had been cleared detects when the player has been caught by a flea/if a power ring has been eaten then it starts to decrement the value in the power ring counter (address 31037) and detects when this reaches zero. It accordingly returns to Basic with a number between one and four, which is then used by the On-Goto in line 50 to reach the appropriate Basic routine ('1' for screen cleared, '2' for power ring expired, '3' for normal, '4' for player hit).
Poke Hex FF22 Video colour control.
Exec 31042 initialises 'flea' stories with start positions, etc.
Poke Hex FFC3/FFC5/FFC7 Selects video mode used.
The machine code data-lists and the strings holding the compressed mazes data are all checksummed, so your first few runs will almost certainly result in error messages directing you to look at certain lines and correct typing mistakes. Unlike Sinclair machines, the Dragon checks lines in Run time, not when entered, so you should select Demo mode and leave it to cycle through all six mazes and tunes so as to give the program the opportunity to spot any mistakes. Having corrected all errors don't forget to re-tape a few copies!
NB: Line 960: All inverse characters: A, A, size I's, A, B, A, I, twenty A's
Line 870: "Press P to play, D for Demo"
The well-known 'speed-up' Poke in Line 335 will work on most Dragons but not all! If it doesn't, then just erase the line and since we used it only to accelerate the maze decoding, the main game will still run at the same speed.
Do not save the game in Fast Mode, it won't load back!!!! If in doubt poke HEX FFD6,0 to return to Slow mode.
At any time during active demo mode or at the end of a game you can press 'P' to play, and during play you can pause by pressing Shift/@. Screen one is particularly easy, while screens four (Sandy Castle) and five (Face the Face) are particularly difficult, but not impossible! In fact there are quite easy ways to clear all the screens, we have both done it, but unlike inferior Pacman type games, it needs practice and the formulation of definite strategies!
(1) If you need to slow the game down add: 24 FOR DE=1 TO 20:NEXT DE. The delay figure of twenty can then be adjusted up or down to find your most comfortable speed.
(2) To make an Autorunning version just add these lines.
12000 CSAVEM "FLEE",157,17000,0 12010 POKE 27,66:POKE 28,104 12020 SOUND 200,10 12030 RUN
To save, type RUN 12000.
To load this version you must use CLOADM since the autorun works by saving the whole program as a machine code file, with the two Pokes to restore 'End of Basic' pointers (we have deliberately over-estimated the latter in case you accidentally type in more spaces than intended, making the program slightly longer than as listed). It is best to still keep a tape of the normal version as a back-up copy.
(3) If you feel you must alter the keys used for control then you must also change the string 'ZCNJ' in Line 10 to the same letters, otherwise demo mode will not work at all.
(4) This program will work on the Dragon 64 if you change USR(00) in line 50 to USR(0).
Ready-typed versions of this program (including an expanded autorunning version of one side) are available for £2.00 from: J. Rogers, 11 Carnarvon Road, Walton, Liverpool, L9 1EB.