Power Man - B.Hobson (Your Spectrum-No.14-Page 64) Just when you thought that Jetman had been pensioned off, he prepares to make a comeback. Yes, the star of screen and monitor, Jetman has returned from the comfort of his South Coast geriatric home, forsaking all thoughts of a weekly pension, to grace your Spectrums once more. His current exploits involve him in collecting objects such as spanners, shovels and clamps, no doubt with the intention of making an extra bob or two as a moonlighting motor mechanic. (These are hard times - Ed.) That or his bath chair is due for a service. Unfortunately, Jetman's twilight years are not destined to be totally trouble free. The terrible lunar monsters are out to thwart him (OK, this isn't the Worthing you know and love, but we never promised realism.) You control Jetman with the following keys: A - up, Z - down, M - right, N - left. If you let our old chum touch one of the lunar monsters, you'll lose a life and you only have three at the start. However, if you manage to reach level 5, you'll not only gain an extra life but you'll deserve a golden handshake. At YS we can only make it as far as level 3 before Jetman gives up the ghost. So, reach for the Grecian 2000 and don't take an age typing in this program. There's life in the old man yet! Lines 5-40 The opening lines lower RAMTOP to prepare the machine code which will print and animate the lunar monsters. Then print the "Please Wait" message and call up the 3 subroutines which set up the machine code, graphics and instructions. Lines 45-70 Set up the initial variables: sc-score, le-level, ob-objects and li-lives. If you find the game a touch too tricky, you can always give yourself more lives. Lines 200-400 Print the first screen. Lines 280-290 print the time bar at the bottom of the screen. Lines 412-500 The main game routine in which the time bar is reduced (line 420), the keyboard scan subroutine is called (line 430) and other subroutines are called to make the movements, etc. Lines 3000-3180 This subroutine scans the keyboard and then updates Jetman's position. Lines 4000-4040 This routine picks up an object and then increases your score. It also checks to see if you've completed your task. Lines 4500-4560 Positions the objects to be collected at random on the screen. Lines 5000-5110 Sets up 'variables' for the machine code which controls the moon monsters. Lines 6000-6100 This routine prints up the score at the end of each game, so you know how well you fared. Lines 6500-6550 OK, so you've made it to a new level - this subroutine prepares for the next one. Lines 7000-7070 If you've been bumped off by a moon monster, this routine takes away a life and checks to see if you've run out. Lines 8000-8110 This is the machine code data. Lines 8500-8750 These set up the Use Defined Graphics which are littered throughout the program. As a guide, to get into graphics mode press CapsShift/9 and then the required character. It will then appear as a graphic. Give it a go - you could end up with a mutant Jetman. Lines 9000-9220 This subroutine prints up the two screens of instructions. Troubleshootin' Pete says: This is a rather nice bit of programming but some extra speed could be injected by making some changes to lines 3070-3180. These lines each run through checks to see if Jetman is about to fall off the edge of the screen. But you can avoid all those sub-routines by checking and updating in one line. See what you think of the following: LET x=x+(INKEY$="Z" AND x<17)>-(INKEY$="A" AND x>4) LET y=y+(INKEY$="M" AND y<29)>-(INKEY$="N" AND y>0) [Not much, as both lines were printed with syntax errors as above,] [plus the program doesn't set CapsLock, so upper case won't work. ] [Still, the idea's OK - if it had been printed properly. jimg.] Pretty neat, eh, even if I say so myself (No one else will! - Ed.). These lines check which keys you're pressing and find out whether you're going off the screen edge into oblivion. They also save a lot of time which is crucial for fast arcade games in Basic. ------------------------------------------------------------------------------ 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 -- Another Fine Product transcribed by: Jim Grimwood (jimg@globalnet.co.uk), Hatfield, England --