CPCWiki forum

General Category => Programming => Topic started by: AMSDOS on 09:17, 02 March 19

Title: Study of 464 Only Game Helicopter / Destination Saturn from ACU.
Post by: AMSDOS on 09:17, 02 March 19

This game has 8 Levels, all of which have their own sections, which take you to the next should you be successful. @Johnny Olsen (http://www.cpcwiki.eu/forum/index.php?action=profile;u=118) sent me a copy of the Original Code from ACU, along with a Level Selector version (both 464 Only) to see the Later levels.


What I've started doing is dissect the Listing, simplify it straight into it's Level core, which is where all the 464 Only problems are occurring and code that into something which will work on all Systems (I hope).
Like other early 464 games, a TXT RD CHAR has been setup to read what's onscreen from a MC routine because 464s didn't have COPYCHR$(#0) as standard and problems start occurring on the other machines, when different PEN(s)/PAPER(s)/Graphics are used, because the 464 didn't make a fuss about what colours were used.
In the 1st stage of this game it seems PAPER is the culprit  - the Bricks use PAPER 4 to get that Green colour along with PEN 1 for the Grey colour. A simple test of changing PAPER 4 to PAPER 0 on line 10 confirmed that when PAPER 0 was used the Helicopter didn't fall through the top platform.


This is what I had for Level 1 after I stripped other parts of the game:



8 pu=0:wal=11:db=224:ENV 1,5,3,5:ENV 2,15,-1,4:ENT 1,15,-1,4
9 GOSUB 9200:GOSUB 9000
10 MODE 0:INK 3,13:INK 4,22:PEN 3:PAPER 4:INK 0,1:FOR q=1 TO 20:LOCATE q,20:PRINT CHR$(135):NEXT
11 BORDER 1
12 INK 6,9
20 FOR f=2 TO 19:LOCATE 1,f:PRINT CHR$(135):LOCATE 20,f:PRINT CHR$(135):NEXT
21 fs=0
30 LOCATE 1,1:FOR q=1 TO 20:LOCATE q,1:PRINT CHR$(135):NEXT
40 FOR f=12 TO 19:LOCATE 13,f:PRINT CHR$(135):NEXT f
45 FOR f=14 TO 19:LOCATE f,5:PRINT CHR$(135):NEXT
50 INK 5,16:PEN 5:PAPER 0:FOR q=1 TO 25:x=INT(RND*10)+2:y=INT(RND*15)+3:LOCATE x,y:PRINT CHR$(138):NEXT q
90 wl=96
95 INK 9,5:INK 10,23:WINDOW #1,1,20,21,25:PAPER #1,9:PEN #1,10:CLS#1
110 x=18:y=4
111 PLOT 607,96,6:DRAWR 32,0,6
120 INK 7,8
125 b1=INT(RND*10)+2:b2=INT(RND*9)+3:LOCATE b1,b2:CALL &A000:IF CHR$(PEEK(&A007))<>" " THEN 125
126 IF wal=4 THEN FOR d=1 TO 8:SOUND 4,106,-1,0,1,1,15:NEXT:CLS#1:LOCATE#1,6,1:PRINT#1,"WELL DONE!":LOCATE #1,1,3:PRINT#1,"Phase >1< Completed.":END
127 PEN 3:PAPER 4:LOCATE b1,b2:PRINT CHR$(135)
130 PEN 7:PAPER 0:LOCATE x,y:PRINT CHR$(129)CHR$(130)
131 wl=wl+1
132 PLOT 416,wl:DRAW 606,wl,6
133 IF wl=db THEN PLOT 416,wl,6:DRAWR -33,0:DRAW 383,96,6:FOR f=96 TO wl:SOUND 1,1,1,2,0,0,10:PLOT 33,f,6::DRAW 383,f,6:NEXT f:END
140 a=x:b=y
150 IF INKEY(9)=0 THEN GOSUB 300:GOTO 170
160 GOSUB 350
170 IF INKEY(63)=0 THEN GOSUB 250
180 IF INKEY(71)=0 THEN GOSUB 400
185 IF INKEY(47)=0 THEN GOSUB 450
186 IF x=b1 AND y+1=b2 AND pu=0 THEN pu=1:sc=sc+5:LOCATE x,y+1:PRINT" ":SOUND 1,478,-1,0,1,0,2
190 LOCATE a,b:PAPER 0:PRINT"  "
192 IF pu=1 AND x=12 AND y=wal-1 THEN LOCATE 13,wal:PEN 3:PAPER 4:sc=sc+5:PRINT CHR$(135):SOUND 2,71,-1,15,2,1,15:wal=wal-1:pu=0:PEN 5:PAPER 0:db=db+16:GOTO 125
200 GOTO 130
250 IF x>=20 THEN RETURN
251 LOCATE x+2,y:CALL &A000:IF CHR$(PEEK(&A007))<>" " THEN RETURN
260 x=x+1:RETURN
300 IF y=1 THEN RETURN
310 LOCATE x,y-1:CALL &A000:IF CHR$(PEEK(&A007))<>" " THEN RETURN
320 IF fs=0 THEN LOCATE x+1,y-1:CALL &A000:IF CHR$(PEEK(&A007))<>" " THEN RETURN
330 y=y-1:RETURN
350 IF y=20 THEN RETURN
360 LOCATE x,y+1:CALL &A000:IF CHR$(PEEK(&A007))<>" " THEN RETURN
370 IF fs=0 THEN LOCATE x+1,y+1:CALL &A000:IF CHR$(PEEK(&A007))<>" " THEN RETURN
380 y=y+1:RETURN
400 IF x<=1 THEN RETURN
401 LOCATE x-1,y:CALL &A000:IF CHR$(PEEK(&A007))<>" " THEN RETURN
410 x=x-1:RETURN
450 REM
455 LOCATE x,y+1:CALL &A000:a$=CHR$(PEEK(&A007))
460 PAPER 0:PEN 8:LOCATE x,y+1:PRINT a$:FOR f=26 TO 0 STEP -1:INK 8,f:SOUND 1,930,4,4,0,0,4:FOR q=1 TO 11:NEXT q:NEXT f
470 LOCATE x,y+1:PRINT" ":PEN 1:RETURN
9000 RESTORE 9010:FOR f=0 TO 6:READ a$:POKE &A000+f,VAL("&"+a$):NEXT:RETURN
9010 DATA cd,60,bb,32,07,a0,c9
9200 SYMBOL AFTER 129
9210 RESTORE 9220:FOR q=0 TO 19:READ a,b,c,d,e,f,g,h:SYMBOL 129+q,a,b,c,d,e,f,g,h:NEXT q:RETURN
9220 DATA 170,8,62,79,127,63,146,127,130,13,14,251,244,192,0,128,255,254,250,248,248,240,208,128,255,158,12,8,8,0,0,0,255,127,95,31,31,15,11,1,0,0,36,0,36,0,0,0,254,254,254,0,191,191,191,0,126,24,44,94,191,191,223,126,60,126,255,126,255,126,255,255
9230 DATA 60,102,223,191,191,255,126,60,28,56,28,56,28,56,28,56,24,12,6,6,6,70,126,0,0,0,129,0,129,0,0,0,0,0,0,24,36,36,24,189,171,213,171,213,171,213,171,213,60,36,24,126,24,60,36,102,24,36,36,24,189,126,36,102,170,255,255,136,85,34,85,136
9240 DATA 12,240,14,129,255,255,255,255,0,0,0,192,248,255,255,255



In order to make the code compatable with all systems, I changed the TXT RD CHAR routine into an array. On this occasion, I've setup a 2D string based array, everything which gets placed onto the Screen goes into the Array as well, from my tests done it looks like Level 1 checks out fine. As suggested from Johnny Olsen, I've modified Line 131 so the wl variable is incremented by 0.75 instead of 1, this variable controlled the speed of the dam rising which was quite difficult, I also had to modify line 133 so if the water level (wl) is greater than the dam wall (db) the overspill is carried out and the program exits there (I haven't included a game over routine in this instance).



8 pu=0:wal=11:db=224:ENV 1,5,3,5:ENV 2,15,-1,4:ENT 1,15,-1,4
9 GOSUB 9200
10 MODE 0:INK 3,13:INK 4,22:PEN 3:PAPER 4:INK 0,1:DIM sc$(20,20):FOR q=1 TO 20:LOCATE q,20:PRINT CHR$(135):sc$(q,20)=CHR$(135):NEXT
11 BORDER 1
12 INK 6,9
20 FOR f=2 TO 19:LOCATE 1,f:PRINT CHR$(135):sc$(1,f)=CHR$(135):LOCATE 20,f:PRINT CHR$(135):sc$(20,f)=CHR$(135):NEXT
21 fs=0
30 LOCATE 1,1:FOR q=1 TO 20:LOCATE q,1:PRINT CHR$(135):sc$(q,1)=CHR$(135):NEXT
40 FOR f=12 TO 19:LOCATE 13,f:PRINT CHR$(135):sc$(13,f)=CHR$(135):NEXT f
45 FOR f=14 TO 19:LOCATE f,5:PRINT CHR$(135):sc$(f,5)=CHR$(135):NEXT
50 INK 5,16:PEN 5:PAPER 0:FOR q=1 TO 25:x=INT(RND*10)+2:y=INT(RND*15)+3:LOCATE x,y:PRINT CHR$(138):sc$(x,y)=CHR$(138):NEXT q
90 wl=96
95 INK 9,5:INK 10,23:WINDOW #1,1,20,21,25:PAPER #1,9:PEN #1,10:CLS#1
110 x=18:y=4
111 PLOT 607,96,6:DRAWR 32,0,6
120 INK 7,8
125 b1=INT(RND*10)+2:b2=INT(RND*9)+3:LOCATE b1,b2:IF sc$(b1,b2)<>"" THEN 125
126 IF wal=4 THEN FOR d=1 TO 8:SOUND 4,106,-1,0,1,1,15:NEXT:CLS#1:LOCATE#1,6,1:PRINT#1,"WELL DONE!":LOCATE #1,1,3:PRINT#1,"Phase >1< Completed.":END
127 PEN 3:PAPER 4:LOCATE b1,b2:PRINT CHR$(135):sc$(b1,b2)=CHR$(135)
130 PEN 7:PAPER 0:LOCATE x,y:PRINT CHR$(129)CHR$(130):sc$(x,y)=CHR$(129):sc$(x+1,y)=CHR$(130)
131 wl=wl+0.75
132 PLOT 416,wl:DRAW 606,wl,6
133 IF wl>db THEN PLOT 416,wl,6:DRAWR -33,0:DRAW 383,96,6:FOR f=96 TO wl:SOUND 1,1,1,2,0,0,10:PLOT 33,f,6:DRAW 383,f,6:NEXT f:CLEAR:END
140 a=x:b=y
150 IF INKEY(0)=0 THEN GOSUB 300:GOTO 170
160 GOSUB 350
170 IF INKEY(1)=0 THEN GOSUB 250
180 IF INKEY(8)=0 THEN GOSUB 400
185 IF INKEY(47)=0 THEN GOSUB 455
186 IF x=b1 AND y+1=b2 AND pu=0 THEN pu=1:sc=sc+5:LOCATE x,y+1:PRINT" ":sc$(x,y+1)="":SOUND 1,478,-1,0,1,0,2
190 LOCATE a,b:PAPER 0:PRINT"  ":sc$(a,b)="":sc$(a+1,b)=""
192 IF pu=1 AND x=12 AND y=wal-1 THEN LOCATE 13,wal:PEN 3:PAPER 4:sc=sc+5:PRINT CHR$(135):sc$(13,wal)=CHR$(135):SOUND 2,71,-1,15,2,1,15:wal=wal-1:pu=0:PEN 5:PAPER 0:db=db+16:GOTO 125
200 GOTO 130
250 IF x>=20 THEN RETURN
251 LOCATE x+2,y:IF sc$(x+2,y)<>"" THEN RETURN
260 x=x+1:RETURN
300 IF y=1 THEN RETURN
310 LOCATE x,y-1:IF sc$(x,y-1)<>"" THEN RETURN
320 IF fs=0 THEN LOCATE x+1,y-1:IF sc$(x+1,y-1)<>"" THEN RETURN
330 y=y-1:RETURN
350 IF y=20 THEN RETURN
360 LOCATE x,y+1:IF sc$(x,y+1)<>"" THEN RETURN
370 IF fs=0 THEN LOCATE x+1,y+1:IF sc$(x+1,y+1)<>"" THEN RETURN
380 y=y+1:RETURN
400 IF x<=1 THEN RETURN
401 LOCATE x-1,y:IF sc$(x-1,y)<>"" THEN RETURN
410 x=x-1:RETURN
450 REM
455 LOCATE x,y+1:a$=sc$(x,y+1)
460 PAPER 0:PEN 8:LOCATE x,y+1:PRINT a$;:FOR f=26 TO 0 STEP -1:INK 8,f:SOUND 1,930,4,4,0,0,4:FOR q=1 TO 11:NEXT q:NEXT f
470 LOCATE x,y+1:PRINT" ":sc$(x,y+1)="":PEN 1:RETURN
9200 SYMBOL AFTER 129
9210 RESTORE 9220:FOR q=0 TO 19:READ a,b,c,d,e,f,g,h:SYMBOL 129+q,a,b,c,d,e,f,g,h:NEXT q:RETURN
9220 DATA 170,8,62,79,127,63,146,127,130,13,14,251,244,192,0,128,255,254,250,248,248,240,208,128,255,158,12,8,8,0,0,0,255,127,95,31,31,15,11,1,0,0,36,0,36,0,0,0,254,254,254,0,191,191,191,0,126,24,44,94,191,191,223,126,60,126,255,126,255,126,255,255
9230 DATA 60,102,223,191,191,255,126,60,28,56,28,56,28,56,28,56,24,12,6,6,6,70,126,0,0,0,129,0,129,0,0,0,0,0,0,24,36,36,24,189,171,213,171,213,171,213,171,213,60,36,24,126,24,60,36,102,24,36,36,24,189,126,36,102,170,255,255,136,85,34,85,136
9240 DATA 12,240,14,129,255,255,255,255,0,0,0,192,248,255,255,255



I kept the original line numbers the same for reference, and for building a new game. The only other changes I made were the keys, the updated version uses Cursor Keys - Left, Right & Up to Control the Helicopter and Space is still used to destroy the blobs onscreen (from above).
Title: Re: Study of 464 Only Game Helicopter / Destination Saturn from ACU.
Post by: AMSDOS on 07:28, 03 March 19
In Level 2 of this game, your Helicopter has to fly through an underground cave, COPY is used to make the Helicopter Move Up, releasing it to Move Down - it's a really tough level.  >:(


Like Level 1, TXT RD CHAR is used again to determine if the Helicopter has hit the Cave roof or the bottom, which works fine on the 464, though isn't totally convincing as the Helicopter occupies two character spaces, and the backside of it can remove bits of that Cave. When I tested on the 6128, the Collision Test worked for the Roof Side of the Cave, though the Helicopter wasn't detecting the Ground side of the cave and simple moving through it like it wasn't there.




8 ENV 1,5,3,5:ENV 2,15,-1,4:ENT 1,15,-1,4
600 BORDER 14:INK 2,14:PAPER 0:PEN 2:PAPER 0:MODE 0:GOSUB 9000:GOSUB 9200
605 cr=0
607 WINDOW #1,1,20,21,25:INK 9,5:INK 10,23:PAPER #1,9:PEN #1,10:CLS#1
610 g=10:FOR f=20 TO 1 STEP-1:ud=-uod:FOR q=1 TO g-2:LOCATE f,q:INK 2,14:PAPER 2:PRINT " ":NEXT q:LOCATE f,q:PAPER 0:PEN 2:PRINT CHR$(132+ud)
620 FOR r=g+5 TO 20:PAPER 2:LOCATE f,r:PRINT" ":NEXT r:LOCATE f,g+4:PAPER 2:PEN 0:PRINT CHR$(132+ud):PAPER 0:PEN 1:uod=INT(RND*3)-1:g=g+(uod AND g>1 AND g<16):NEXT
625 PEN 1:PAPER 0
630 FOR f=1 TO 10:LOCATE 19,f:PRINT"  ":NEXT
640 INK 4,26:FOR f=1 TO 10:LOCATE 19,f:SOUND 1,478-(f*5),1,6:PEN 4:PRINT CHR$(129)CHR$(130):FOR q=1 TO 200:NEXT q:LOCATE 19,f:PRINT"  ":NEXT f
650 x=19:y=11
660 LOCATE x,y:PRINT CHR$(129)CHR$(130):a=x:b=y
665 IF cr=1 THEN INK 2,6,24:SPEED INK 2,2:FOR c=5 TO 15:SOUND 7,1000,2,7,0,0,3:INK c,INT(RND*20):PEN c:PRINT CHR$(22)CHR$(1):LOCATE x,y:PRINT CHR$(INT(RND*12)+173)CHR$(INT(RND*12)+173):FOR wa=1 TO 50:NEXT wa:NEXT c:PRINT CHR$(22)CHR$(0):PEN 1:END
670 IF INKEY(9)=0 THEN y=y-1:GOTO 685
680 y=y+1
685 x=x-1:sc=sc+1:IF x=0 THEN GOTO 800
690 LOCATE x,y:CALL &A000:IF CHR$(PEEK(&A007))<>" " THEN cr=1
695 FOR q=1 TO 7:SOUND 1,800,1,7,0,0,10:SOUND 1,800,1,0,0,0,10:NEXT q
700 LOCATE a,b:PRINT"  "
710 GOTO 660
800 FOR d=1 TO 8:SOUND 4,106,-1,0,1,1,15:NEXT:CLS#1:LOCATE#1,6,1:PRINT#1,"WELL DONE!":LOCATE #1,1,3:PRINT#1,"Phase >2< Completed.":END
9000 RESTORE 9010:FOR f=0 TO 6:READ a$:POKE &A000+f,VAL("&"+a$):NEXT:RETURN
9010 DATA cd,60,bb,32,07,a0,c9
9200 SYMBOL AFTER 129
9210 RESTORE 9220:FOR q=0 TO 19:READ a,b,c,d,e,f,g,h:SYMBOL 129+q,a,b,c,d,e,f,g,h:NEXT q:RETURN
9220 DATA 170,8,62,79,127,63,146,127,130,13,14,251,244,192,0,128,255,254,250,248,248,240,208,128,255,158,12,8,8,0,0,0,255,127,95,31,31,15,11,1,0,0,36,0,36,0,0,0,254,254,254,0,191,191,191,0,126,24,44,94,191,191,223,126,60,126,255,126,255,126,255,255
9230 DATA 60,102,223,191,191,255,126,60,28,56,28,56,28,56,28,56,24,12,6,6,6,70,126,0,0,0,129,0,129,0,0,0,0,0,0,24,36,36,24,189,171,213,171,213,171,213,171,213,60,36,24,126,24,60,36,102,24,36,36,24,189,126,36,102,170,255,255,136,85,34,85,136
9240 DATA 12,240,14,129,255,255,255,255,0,0,0,192,248,255,255,255



My version again simply replaces the use of TXT RD CHAR with a 2D String Array, which results in a game playing the same way as the original was on the 464, I haven't tried correcting the way the collision detection was from the original game as the level is hard enough as it is.




8 ENV 1,5,3,5:ENV 2,15,-1,4:ENT 1,15,-1,4
600 BORDER 14:INK 2,14:PAPER 0:PEN 2:PAPER 0:MODE 0:GOSUB 9200
605 DIM sc$(20,20):cr=0
607 WINDOW #1,1,20,21,25:INK 9,5:INK 10,23:PAPER #1,9:PEN #1,10:CLS#1
610 g=10:FOR f=20 TO 1 STEP-1:ud=-uod:FOR q=1 TO g-2:LOCATE f,q:INK 2,14:PAPER 2:PRINT " ":sc$(f,q)=" ":NEXT q:LOCATE f,q:PAPER 0:PEN 2:PRINT CHR$(132+ud):sc$(f,q)=CHR$(132+ud)
620 FOR r=g+5 TO 20:PAPER 2:LOCATE f,r:PRINT" ":sc$(f,r)=" ":NEXT r:LOCATE f,g+4:PAPER 2:PEN 0:PRINT CHR$(132+ud):sc$(f,g+4)=CHR$(132+ud):PAPER 0:PEN 1:uod=INT(RND*3)-1:g=g+(uod AND g>1 AND g<16):NEXT
625 PEN 1:PAPER 0
630 FOR f=1 TO 10:LOCATE 19,f:PRINT"  ":sc$(19,f)="":sc$(20,f)="":NEXT
640 INK 4,26:FOR f=1 TO 10:LOCATE 19,f:SOUND 1,478-(f*5),1,6:PEN 4:PRINT CHR$(129)CHR$(130):sc$(19,f)=CHR$(129):sc$(20,f)=CHR$(130):FOR q=1 TO 200:NEXT q:LOCATE 19,f:PRINT"  ":sc$(19,f)=" ":sc$(20,f)=" ":NEXT f
650 x=19:y=11
660 LOCATE x,y:PRINT CHR$(129)CHR$(130):sc$(x,y)=CHR$(129):sc$(x+1,y)=CHR$(130):a=x:b=y
665 IF cr=1 THEN INK 2,6,24:SPEED INK 2,2:FOR c=5 TO 15:SOUND 7,1000,2,7,0,0,3:INK c,INT(RND*20):PEN c:PRINT CHR$(22)CHR$(1):LOCATE x,y:PRINT CHR$(INT(RND*12)+173)CHR$(INT(RND*12)+173):FOR wa=1 TO 50:NEXT wa:NEXT c:PRINT CHR$(22)CHR$(0):PEN 1:CLEAR:END
670 IF INKEY(9)=0 THEN y=y-1:GOTO 685
680 y=y+1
685 x=x-1:sc=sc+1:IF x=0 THEN GOTO 800
690 IF sc$(x,y)<>"" THEN cr=1
695 FOR q=1 TO 7:SOUND 1,800,1,7,0,0,10:SOUND 1,800,1,0,0,0,10:NEXT q
700 LOCATE a,b:PRINT"  "
710 GOTO 660
800 FOR d=1 TO 8:SOUND 4,106,-1,0,1,1,15:NEXT:CLS#1:LOCATE#1,6,1:PRINT#1,"WELL DONE!":LOCATE #1,1,3:PRINT#1,"Phase >2< Completed.":CLEAR:END
9200 SYMBOL AFTER 129
9210 RESTORE 9220:FOR q=0 TO 19:READ a,b,c,d,e,f,g,h:SYMBOL 129+q,a,b,c,d,e,f,g,h:NEXT q:RETURN
9220 DATA 170,8,62,79,127,63,146,127,130,13,14,251,244,192,0,128,255,254,250,248,248,240,208,128,255,158,12,8,8,0,0,0,255,127,95,31,31,15,11,1,0,0,36,0,36,0,0,0,254,254,254,0,191,191,191,0,126,24,44,94,191,191,223,126,60,126,255,126,255,126,255,255
9230 DATA 60,102,223,191,191,255,126,60,28,56,28,56,28,56,28,56,24,12,6,6,6,70,126,0,0,0,129,0,129,0,0,0,0,0,0,24,36,36,24,189,171,213,171,213,171,213,171,213,60,36,24,126,24,60,36,102,24,36,36,24,189,126,36,102,170,255,255,136,85,34,85,136
9240 DATA 12,240,14,129,255,255,255,255,0,0,0,192,248,255,255,255




Title: Re: Study of 464 Only Game Helicopter / Destination Saturn from ACU.
Post by: AMSDOS on 09:54, 13 March 19
Level 3 of this game actually works on All CPCs because it doesn't use TXT RD CHAR, however I've carved it up just to Highlight the code.


In this level you have to rescue some characters stuck in a trench with your Helicopter, like level 1 I modified the Z,X, Copy Keys to move the Helicopter to use Left, Right Arrow Keys & Space to lower the Rescue Claw. The objective in this level is to rescue 5 characters and you have 10 Attempts. There's no Time Limit in this level, but is still hard since the characters move all over the place so quickly. The best chance seems to be when they are on either end.




8 ENV 1,5,3,5:ENV 2,15,-1,4:ENT 1,15,-1,4
9 GOSUB 9200
801 PEN 1:INK 0,26:INK 1,0:PAPER 0:BORDER 9:MODE 0:CLS
810 at=10:FOR f=15 TO 20:LOCATE 1,f:INK 2,9:PAPER 2:PRINT"                    ":NEXT f
820 INK 3,14:INK 4,4:PEN 3:PAPER 4:FOR f=1 TO 5:LOCATE f,14:PRINT CHR$(146):NEXT f
825 INK 3,14:INK 4,4:PEN 3:PAPER 4:FOR f=14 TO 20:LOCATE f,14:PRINT CHR$(146):NEXT f:PEN 1:PAPER 0
830 FOR f=10 TO 13:LOCATE 16,f:PAPER 1:PRINT"     ":NEXT f
835 LOCATE 15,9:INK 5,3:PAPER 5:PRINT"      "
837 WINDOW #1,1,20,21,25:INK 9,5:INK 10,23:PAPER #1,9:PEN #1,10:CLS#1
840 PEN 1:PAPER 0
850 x=14:y=8:co=0
855 GOSUB 910:pe=INT(RND*5)+6
856 GOSUB 911
860 LOCATE x,y:PRINT CHR$(129)CHR$(130):a=x:b=y
863 LOCATE pe,14:PRINT CHR$(142):pp=pe
865 IF INKEY(8)=0 THEN IF x>1 THEN x=x-1
870 IF INKEY(1)=0 THEN IF x<14 THEN x=x+1
880 IF INKEY(47)=0 THEN br=1:at=at-1:GOSUB 910:FOR f=9 TO 12:LOCATE x,f:PRINT CHR$(139):NEXT f:LOCATE x,13:PRINT CHR$(140):FOR f=1 TO 200:NEXT f:FOR f=9 TO 13:LOCATE x,f:PRINT" ":NEXT f:IF x=pe THEN GOSUB 920:IF co=5 THEN 1000 ELSE GOTO 855
885 IF br=1 THEN br=0:GOSUB 911
890 pe=pe+INT(RND*3)-1:IF pe>13 THEN pe=13
891 IF pe<6 THEN pe=6
895 LOCATE pp,14:PRINT" ":LOCATE a,b:PRINT"  "
900 GOTO 860
910 LOCATE #1,1,1:PRINT#1,"ATTEMPTS:"at" ":LOCATE #1,1,3:PRINT#1,"RESCUED :"co" ":RETURN
911 IF at=0 THEN END
912 RETURN
920 co=co+1:LOCATE pe,14:PRINT" ":sc=sc+20:RETURN
1000 SPEED INK 8,8:LOCATE #1,1,3:PEN #1,1:PAPER 0:PAPER#1,0:PRINT#1,"Phase >3< Completed.":LOCATE #1,6,1:PRINT#1,"WELL DONE!":FOR d=1 TO 8:SOUND 4,106,-1,0,1,1,15:NEXT:END
9200 SYMBOL AFTER 129
9210 RESTORE 9220:FOR q=0 TO 19:READ a,b,c,d,e,f,g,h:SYMBOL 129+q,a,b,c,d,e,f,g,h:NEXT q:RETURN
9220 DATA 170,8,62,79,127,63,146,127,130,13,14,251,244,192,0,128,255,254,250,248,248,240,208,128,255,158,12,8,8,0,0,0,255,127,95,31,31,15,11,1,0,0,36,0,36,0,0,0,254,254,254,0,191,191,191,0,126,24,44,94,191,191,223,126,60,126,255,126,255,126,255,255
9230 DATA 60,102,223,191,191,255,126,60,28,56,28,56,28,56,28,56,24,12,6,6,6,70,126,0,0,0,129,0,129,0,0,0,0,0,0,24,36,36,24,189,171,213,171,213,171,213,171,213,60,36,24,126,24,60,36,102,24,36,36,24,189,126,36,102,170,255,255,136,85,34,85,136
9240 DATA 12,240,14,129,255,255,255,255,0,0,0,192,248,255,255,255
Title: Re: Study of 464 Only Game Helicopter / Destination Saturn from ACU.
Post by: AMSDOS on 11:20, 23 March 19
A little update and I have now covered Levels 4 & 5 now.


Level 4 like Level 3 hasn't required any changes necessary to run correctly on all, but in the spirit of turning into a single game, here it is:




8 ENV 1,5,3,5:ENV 2,15,-1,4:ENT 1,15,-1,4
9 GOSUB 9200
1005 FOR f=1 TO 3500:NEXT f
1010 CLS:INK 0,2:INK 1,26:BORDER 2:MODE 1
1018 cv=2
1020 FOR f=1 TO 40:FOR q=1 TO cv:LOCATE f,q:PAPER 1:PRINT" ":GOSUB 1021:NEXT q:LOCATE f,q:PAPER 0:PRINT CHR$(132):NEXT f:GOTO 1025
1021 cv=cv+INT(RND*3)-1:IF cv>3 THEN cv=3
1022 IF cv<1 THEN cv=1
1023 RETURN
1025 INK 2,14
1030 FOR f=1 TO 40:LOCATE f,20:PEN 0:PAPER 1:PRINT CHR$(132):NEXT f:PEN 1:PAPER 0
1035 WINDOW #1,1,40,21,25:PAPER #1,2:CLS#1
1040 rea=INT(RND*15)+3:LOCATE rea,19:PEN 2:PRINT CHR$(137):PRINT CHR$(22)CHR$(1):LOCATE rea,19:PEN 3:PRINT CHR$(134):INK 3,0,26:PEN 3:LOCATE rea,19:PRINT CHR$(141):PRINT CHR$(22)CHR$(0):PEN 1
1050 x=39:bo=0
1060 LOCATE x,5:PEN 1:PRINT CHR$(129)CHR$(130):a=x
1065 IF INKEY(9)=0 AND bo=0 THEN bo=1:fa=6
1070 IF bo=1 THEN LOCATE x,fa:PRINT CHR$(136):SOUND 4,10+(fa*2),1,5
1075 SOUND 1,1500,1,5,0,0,10
1080 x=x-1:IF x=0 THEN END
1085 LOCATE a,5:PRINT"  ":IF bo=1 THEN LOCATE a,fa:PRINT" "
1090 IF bo=1 THEN fa=fa+1:IF fa=19 THEN 1100
1095 GOTO 1060
1100 IF x=rea THEN INK 9,5:INK 10,23:PEN#1,9:PAPER#1,10:FOR d=1 TO 8:SOUND 4,106,-1,0,1,1,15:NEXT:CLS#1:LOCATE#1,6,1:PRINT#1,"     W E L L   D O N E ! ":LOCATE #1,1,3:PRINT#1," P h a s e   > 4 <   C o m p l e t e d . ":END
1110 END
9200 SYMBOL AFTER 129
9210 RESTORE 9220:FOR q=0 TO 19:READ a,b,c,d,e,f,g,h:SYMBOL 129+q,a,b,c,d,e,f,g,h:NEXT q:RETURN
9220 DATA 170,8,62,79,127,63,146,127,130,13,14,251,244,192,0,128,255,254,250,248,248,240,208,128,255,158,12,8,8,0,0,0,255,127,95,31,31,15,11,1,0,0,36,0,36,0,0,0,254,254,254,0,191,191,191,0,126,24,44,94,191,191,223,126,60,126,255,126,255,126,255,255
9230 DATA 60,102,223,191,191,255,126,60,28,56,28,56,28,56,28,56,24,12,6,6,6,70,126,0,0,0,129,0,129,0,0,0,0,0,0,24,36,36,24,189,171,213,171,213,171,213,171,213,60,36,24,126,24,60,36,102,24,36,36,24,189,126,36,102,170,255,255,136,85,34,85,136
9240 DATA 12,240,14,129,255,255,255,255,0,0,0,192,248,255,255,255



Level 5 however returns to the problematic TXT RD CHAR which only works properly on the 464, here's the original code:




8 ENV 1,5,3,5:ENV 2,15,-1,4:ENT 1,15,-1,4
9 GOSUB 9200:GOSUB 9000:GOTO 1300
250 IF x>=20 THEN RETURN
251 LOCATE x+2,y:CALL &A000:IF CHR$(PEEK(&A007))<>" " THEN RETURN
260 x=x+1:RETURN
300 IF y=1 THEN RETURN
310 LOCATE x,y-1:CALL &A000:IF CHR$(PEEK(&A007))<>" " THEN RETURN
320 IF fs=0 THEN LOCATE x+1,y-1:CALL &A000:IF CHR$(PEEK(&A007))<>" " THEN RETURN
330 y=y-1:RETURN
350 IF y=20 THEN RETURN
360 LOCATE x,y+1:CALL &A000:IF CHR$(PEEK(&A007))<>" " THEN RETURN
370 IF fs=0 THEN LOCATE x+1,y+1:CALL &A000:IF CHR$(PEEK(&A007))<>" " THEN RETURN
380 y=y+1:RETURN
400 IF x<=1 THEN RETURN
401 LOCATE x-1,y:CALL &A000:IF CHR$(PEEK(&A007))<>" " THEN RETURN
410 x=x-1:RETURN
450 REM
455 LOCATE x,y+1:CALL &A000:a$=CHR$(PEEK(&A007))
460 PAPER 0:PEN 8:LOCATE x,y+1:PRINT a$:FOR f=26 TO 0 STEP -1:INK 8,f:SOUND 1,930,4,4,0,0,4:FOR q=1 TO 11:NEXT q:NEXT f
470 LOCATE x,y+1:PRINT" ":PEN 1:RETURN
1300 fs=1:FOR f=1 TO 3500:NEXT f
1301 pu=0
1305 BORDER 3:INK 0,3:INK 1,26:PEN 1:PAPER 0:CLS:MODE 0
1307 WINDOW#1,1,20,21,25:INK 9,5:INK 10,23:PEN #1,9:PAPER #1,10:CLS#1
1310 INK 2,15:INK 3,5
1315 PEN 2:PAPER 3:FOR f=15 TO 20:FOR q=1 TO 6:LOCATE q,f:PRINT CHR$(135):NEXT q:FOR q=15 TO 20:LOCATE q,f:PRINT CHR$(135):NEXT q:NEXT f:PEN 1:PAPER 0
1320 FOR f=2 TO 10 STEP 2:FOR q=1 TO 20:LOCATE q,f:INK 4,14:PEN 4:PAPER 0:PRINT CHR$(132):NEXT q:FOR o=1 TO 2:PEN 1:LOCATE INT(RND*18)+2,f:PRINT" ":NEXT o:NEXT f
1321 INK 6,2:FOR f=1 TO 10:PEN 4:PAPER 6:LOCATE 1,f:PRINT CHR$(143):LOCATE 20,f:PRINT CHR$(143):NEXT f
1330 PEN 5:PAPER 0:INK 5,26:LOCATE 7,15:PRINT CHR$(146)
1337 mo=1
1340 br=8:x=20:y=14
1345 xc=INT(RND*18)+2:yc=INT((RND*5)+1)*2:LOCATE x,y:CALL &A000:IF PEEK(&A007)=132 THEN GOTO 1345
1346 LOCATE xc,yc:PEN 5:PAPER 0:PRINT CHR$(146)
1350 LOCATE x,y:PEN 4:PRINT CHR$(144):PEN 1:a=x:b=y
1351 LOCATE mo,14:INK 7,20:PEN 7:PRINT CHR$(145):mox=mo
1352 IF INKEY(9)=0 THEN GOSUB 300:GOTO 1355
1353 GOSUB 350
1354 mo=mo+(1/18)
1355 IF INKEY(63)=0 THEN x=x-1:GOSUB 250:x=x+1
1360 IF INKEY(71)=0 THEN GOSUB 400
1365 LOCATE a,b:PEN 1:PAPER 0:PRINT" "
1366 LOCATE mox,14:PEN 1:PRINT" "
1370 IF pu=0 AND x=xc AND y=yc-1 THEN pu=1:LOCATE xc,yc:PRINT" ":sc=sc+5
1371 IF br=15 THEN CLS#1:LOCATE#1,6,1:PRINT#1,"WELL DONE!":LOCATE #1,1,3:PRINT#1,"Phase >5< Completed.":FOR d=1 TO 8:SOUND 4,106,-1,0,1,1,15:NEXT:FOR f=1 TO 3500:NEXT f:END
1372 IF INT(mo)=br THEN FOR f=15 TO 20:LOCATE br,f:PRINT CHR$(144):SOUND 1,f*3,1,7:FOR d=1 TO 5:NEXT d:LOCATE br,f:PRINT" ":NEXT f:END
1375 IF pu=1 AND x=br AND y=14 THEN LOCATE br,15:PEN 5:PAPER 0:PRINT CHR$(146):pu=0:br=br+1:sc=sc+5:GOTO 1345
1380 GOTO 1350
9000 RESTORE 9010:FOR f=0 TO 6:READ a$:POKE &A000+f,VAL("&"+a$):NEXT:RETURN
9010 DATA cd,60,bb,32,07,a0,c9
9200 SYMBOL AFTER 129
9210 RESTORE 9220:FOR q=0 TO 19:READ a,b,c,d,e,f,g,h:SYMBOL 129+q,a,b,c,d,e,f,g,h:NEXT q:RETURN
9220 DATA 170,8,62,79,127,63,146,127,130,13,14,251,244,192,0,128,255,254,250,248,248,240,208,128,255,158,12,8,8,0,0,0,255,127,95,31,31,15,11,1,0,0,36,0,36,0,0,0,254,254,254,0,191,191,191,0,126,24,44,94,191,191,223,126,60,126,255,126,255,126,255,255
9230 DATA 60,102,223,191,191,255,126,60,28,56,28,56,28,56,28,56,24,12,6,6,6,70,126,0,0,0,129,0,129,0,0,0,0,0,0,24,36,36,24,189,171,213,171,213,171,213,171,213,60,36,24,126,24,60,36,102,24,36,36,24,189,126,36,102,170,255,255,136,85,34,85,136
9240 DATA 12,240,14,129,255,255,255,255,0,0,0,192,248,255,255,255



Actually I made one modification from the original, which is on line 1354. The original had something like:
1354 mo=mo+(1/12)


which controls how quickly the Alien moves. Altering the fraction to 1/18 has made this level a lot fairer, true I've probably made the level a lot easier, though with 8 stages to get to the 5th and bomb out from a seemly impossible level would be very frustrating.


You may notice that this level also returns to the TXT RD CHAR code which is used for the 1st Level. In my revised version for this level, no alterations were necessary, however you may note I have removed the LOCATE statements from lines 251,310,360,401, these were simply not necessary to have as they are checks from within the Array, the result is another level working on all CPCs.


8 ENV 1,5,3,5:ENV 2,15,-1,4:ENT 1,15,-1,4
9 GOSUB 9200:GOTO 1300
250 IF x>=20 THEN RETURN
251 IF sc$(x+2,y)<>"" THEN RETURN
260 x=x+1:RETURN
300 IF y=1 THEN RETURN
310 IF sc$(x,y-1)<>"" THEN RETURN
320 IF fs=0 THEN IF sc$(x+1,y-1)<>"" THEN RETURN
330 y=y-1:RETURN
350 IF y=20 THEN RETURN
360 IF sc$(x,y+1)<>"" THEN RETURN
370 IF fs=0 THEN IF sc$(x+1,y+1)<>"" THEN RETURN
380 y=y+1:RETURN
400 IF x<=1 THEN RETURN
401 IF sc$(x-1,y)<>"" THEN RETURN
410 x=x-1:RETURN
450 REM
455 LOCATE x,y+1:a$=sc$(x,y+1)
460 PAPER 0:PEN 8:LOCATE x,y+1:PRINT a$:FOR f=26 TO 0 STEP -1:INK 8,f:SOUND 1,930,4,4,0,0,4:FOR q=1 TO 11:NEXT q:NEXT f
470 LOCATE x,y+1:PRINT" ":sc$(x,y+1)="":PEN 1:RETURN
1300 DIM sc$(20,20):fs=1:FOR f=1 TO 3500:NEXT f
1301 pu=0
1305 BORDER 3:INK 0,3:INK 1,26:PEN 1:PAPER 0:CLS:MODE 0
1307 WINDOW#1,1,20,21,25:INK 9,5:INK 10,23:PEN #1,9:PAPER #1,10:CLS#1
1310 INK 2,15:INK 3,5
1315 PEN 2:PAPER 3:FOR f=15 TO 20:FOR q=1 TO 6:LOCATE q,f:PRINT CHR$(135):sc$(q,f)=CHR$(135):NEXT q:FOR q=15 TO 20:LOCATE q,f:PRINT CHR$(135):sc$(q,f)=CHR$(135):NEXT q:NEXT f:PEN 1:PAPER 0
1320 FOR f=2 TO 10 STEP 2:FOR q=1 TO 20:LOCATE q,f:INK 4,14:PEN 4:PAPER 0:PRINT CHR$(132):sc$(q,f)=CHR$(132):NEXT q:FOR o=1 TO 2:PEN 1:s1=INT(RND*18)+2:LOCATE s1,f:PRINT" ":sc$(s1,f)="":NEXT o:NEXT f
1321 INK 6,2:FOR f=1 TO 10:PEN 4:PAPER 6:LOCATE 1,f:PRINT CHR$(143):sc$(1,f)=CHR$(143):LOCATE 20,f:PRINT CHR$(143):sc$(20,f)=CHR$(143):NEXT f
1330 PEN 5:PAPER 0:INK 5,26:LOCATE 7,15:PRINT CHR$(146):sc$(7,15)=CHR$(146)
1337 mo=1
1340 br=8:x=20:y=14
1345 xc=INT(RND*18)+2:yc=INT((RND*5)+1)*2:IF sc$(x,y)=CHR$(132) THEN GOTO 1345
1346 LOCATE xc,yc:PEN 5:PAPER 0:PRINT CHR$(146):sc$(xc,yc)=CHR$(146)
1350 LOCATE x,y:PEN 4:PRINT CHR$(144):sc$(x,y)=CHR$(144):PEN 1:a=x:b=y
1351 LOCATE mo,14:INK 7,20:PEN 7:PRINT CHR$(145):sc$(mo,14)=CHR$(145):mox=mo
1352 IF INKEY(0)=0 THEN GOSUB 300:GOTO 1355
1353 GOSUB 350
1354 mo=mo+(1/18)
1355 IF INKEY(1)=0 THEN x=x-1:GOSUB 250:x=x+1
1360 IF INKEY(8)=0 THEN GOSUB 400
1365 LOCATE a,b:PEN 1:PAPER 0:PRINT" ":sc$(a,b)=""
1366 LOCATE mox,14:PEN 1:PRINT" ":sc$(mox,14)=""
1370 IF pu=0 AND x=xc AND y=yc-1 THEN pu=1:LOCATE xc,yc:PRINT" ":sc$(xc,yc)="":sc=sc+5
1371 IF br=15 THEN CLS#1:LOCATE#1,6,1:PRINT#1,"WELL DONE!":LOCATE #1,1,3:PRINT#1,"Phase >5< Completed.":FOR d=1 TO 8:SOUND 4,106,-1,0,1,1,15:NEXT:FOR f=1 TO 3500:NEXT f:ERASE sc$:END
1372 IF INT(mo)=br THEN FOR f=15 TO 20:LOCATE br,f:PRINT CHR$(144):sc$(br,f)=CHR$(144):SOUND 1,f*3,1,7:FOR d=1 TO 5:NEXT d:LOCATE br,f:PRINT" ":sc$(br,f)="":NEXT f:END
1375 IF pu=1 AND x=br AND y=14 THEN LOCATE br,15:PEN 5:PAPER 0:PRINT CHR$(146):sc$(br,15)=CHR$(146):pu=0:br=br+1:sc=sc+5:GOTO 1345
1380 GOTO 1350
9200 SYMBOL AFTER 129
9210 RESTORE 9220:FOR q=0 TO 19:READ a,b,c,d,e,f,g,h:SYMBOL 129+q,a,b,c,d,e,f,g,h:NEXT q:RETURN
9220 DATA 170,8,62,79,127,63,146,127,130,13,14,251,244,192,0,128,255,254,250,248,248,240,208,128,255,158,12,8,8,0,0,0,255,127,95,31,31,15,11,1,0,0,36,0,36,0,0,0,254,254,254,0,191,191,191,0,126,24,44,94,191,191,223,126,60,126,255,126,255,126,255,255
9230 DATA 60,102,223,191,191,255,126,60,28,56,28,56,28,56,28,56,24,12,6,6,6,70,126,0,0,0,129,0,129,0,0,0,0,0,0,24,36,36,24,189,171,213,171,213,171,213,171,213,60,36,24,126,24,60,36,102,24,36,36,24,189,126,36,102,170,255,255,136,85,34,85,136
9240 DATA 12,240,14,129,255,255,255,255,0,0,0,192,248,255,255,255



Please note I also made some changes to the Keys, so Z,X & Copy have been remapped to Left, Right & Up Cursor Keys.
Title: Re: Study of 464 Only Game Helicopter / Destination Saturn from ACU.
Post by: AMSDOS on 06:55, 31 March 19
Level 6 returns to the same problems which occurred in Level 2, only this time nothing seemed to be working in BASIC 1.1 with a Man falling through everything and not registering on the TXT RD CHAR checks because the scenery is of another colour I suspect being the problem.


On this Level the checks are made to see if Space is found, this is again another tough level with 2 Spaces allocated between the Drawn Scenery, meaning there's not much room for error. In the original code below I've kept everything the same as presented in the level, again with just the Scoring and Game Over routines removed, I also haven't altered from the 'Z' and 'X' Controls:




8 ENV 1,5,3,5:ENV 2,15,-1,4:ENT 1,15,-1,4
9 GOSUB 9200:GOSUB 9000
4000 MODE 0:INK 0,26:BORDER 26:INK 1,0:PEN 1:PAPER 0:CLS
4005 WINDOW#1,1,20,21,25:INK 9,5:INK 10,23:PEN#1,9:PAPER #1,10:CLS#1
4010 be=10:INK 2,2:INK 3,9,19:SPEED INK 32,32:FOR f=1 TO 4:LOCATE 1,f:PEN 2:PAPER 3:PRINT STRING$(20,143):PEN 1:PAPER 0:LOCATE 10,f:PRINT"  ":NEXT f
4020 FOR f=4 TO 19
4021 be=be+INT(RND*3)-1:IF be=20 THEN be=19 ELSE IF be=0 THEN be=1
4022 LOCATE 1,f:PEN 2:PAPER 3:PRINT STRING$(20,143):PEN 1:PAPER 0:LOCATE be,f:PRINT"  ":NEXT f
4030 PEN 4:PAPER 5:INK 4,15:INK 5,0:LOCATE 1,20:PRINT STRING$(20,146)
4040 FOR f=be TO 20:LOCATE f,19:PEN 1:PAPER 0:PRINT" ":NEXT f
4045 x=10:y=1
4050 INK 9,14:LOCATE x,y:PEN 9:PRINT CHR$(144):a=x:b=y
4051 sc=sc+1
4055 IF INKEY(63)=0 THEN x=x+1
4060 IF INKEY(71)=0 THEN x=x-1
4070 SOUND 1,478+(y*3),4,5:FOR f=1 TO 105:NEXT f
4072 y=y+1:IF y=20 THEN CLS#1:LOCATE#1,6,1:PRINT#1,"WELL DONE!":LOCATE #1,1,3:PRINT#1,"Phase >6< Completed.":FOR d=1 TO 8:SOUND 4,106,-1,0,1,1,15:NEXT:FOR f=1 TO 3500:NEXT f:END
4075 LOCATE a,b:PRINT" "
4077 LOCATE x,y:CALL &A000:IF CHR$(PEEK(&A007))<>" " THEN END
4080 GOTO 4050
9000 RESTORE 9010:FOR f=0 TO 6:READ a$:POKE &A000+f,VAL("&"+a$):NEXT:RETURN
9010 DATA cd,60,bb,32,07,a0,c9
9200 SYMBOL AFTER 129
9210 RESTORE 9220:FOR q=0 TO 19:READ a,b,c,d,e,f,g,h:SYMBOL 129+q,a,b,c,d,e,f,g,h:NEXT q:RETURN
9220 DATA 170,8,62,79,127,63,146,127,130,13,14,251,244,192,0,128,255,254,250,248,248,240,208,128,255,158,12,8,8,0,0,0,255,127,95,31,31,15,11,1,0,0,36,0,36,0,0,0,254,254,254,0,191,191,191,0,126,24,44,94,191,191,223,126,60,126,255,126,255,126,255,255
9230 DATA 60,102,223,191,191,255,126,60,28,56,28,56,28,56,28,56,24,12,6,6,6,70,126,0,0,0,129,0,129,0,0,0,0,0,0,24,36,36,24,189,171,213,171,213,171,213,171,213,60,36,24,126,24,60,36,102,24,36,36,24,189,126,36,102,170,255,255,136,85,34,85,136
9240 DATA 12,240,14,129,255,255,255,255,0,0,0,192,248,255,255,255



In my interpreted version, I've altered it into the Cursor Keys, I also had to make some changes which relate to how the Array plays in with the game:


4010 - I had to adjust the 'f' loop from 1 to 3, which was 1 to 4 in the original because I found an error which allowed the falling person to fall through a bit of scenery if it was present without ending the game. It didn't seem to be a problem in the original when using TXT RD CHAR, but in the case of the array a gap could of been placed there followed by the scenery to be drawn over it, making it a problem for the collision test later in the code.


For the case of this level, a TXT RD CHAR is simply replaced again with a String Array and all the Spaces are written to array, resulting in any Null value in the Array to simply end the Game if a person shall come into contact with it or fall onto it.




8 ENV 1,5,3,5:ENV 2,15,-1,4:ENT 1,15,-1,4
9 GOSUB 9200
4000 MODE 0:INK 0,26:BORDER 26:INK 1,0:PEN 1:PAPER 0:CLS:DIM sc$(20,20)
4005 WINDOW#1,1,20,21,25:INK 9,5:INK 10,23:PEN#1,9:PAPER #1,10:CLS#1
4010 be=10:INK 2,2:INK 3,9,19:SPEED INK 32,32:FOR f=1 TO 3:LOCATE 1,f:PEN 2:PAPER 3:PRINT STRING$(20,143):PEN 1:PAPER 0:LOCATE 10,f:PRINT"  ":sc$(10,f)=" ":sc$(11,f)=" ":NEXT f
4020 FOR f=4 TO 19
4021 be=be+INT(RND*3)-1:IF be=20 THEN be=19 ELSE IF be=0 THEN be=1
4022 LOCATE 1,f:PEN 2:PAPER 3:PRINT STRING$(20,143):PEN 1:PAPER 0:LOCATE be,f:PRINT"  ":sc$(be,f)=" ":sc$(be+1,f)=" ":NEXT f
4030 PEN 4:PAPER 5:INK 4,15:INK 5,0:LOCATE 1,20:PRINT STRING$(20,146)
4040 FOR f=be TO 20:LOCATE f,19:PEN 1:PAPER 0:PRINT" ":sc$(f,19)=" ":NEXT f
4045 x=10:y=1
4050 INK 9,14:LOCATE x,y:PEN 9:PRINT CHR$(144):a=x:b=y
4051 sc=sc+1
4055 IF INKEY(1)=0 THEN x=x+1
4060 IF INKEY(8)=0 THEN x=x-1
4070 SOUND 1,478+(y*3),4,15:FOR f=1 TO 105:NEXT f
4072 y=y+1:IF y=20 THEN CLS#1:LOCATE#1,6,1:PRINT#1,"WELL DONE!":LOCATE #1,1,3:PRINT#1,"Phase >6< Completed.":FOR d=1 TO 8:SOUND 4,106,-1,0,1,1,15:NEXT:FOR f=1 TO 3500:NEXT f:ERASE sc$:END
4075 LOCATE a,b:PRINT" "
4077 IF sc$(x,y)<>" " THEN END
4080 GOTO 4050
9200 SYMBOL AFTER 129
9210 RESTORE 9220:FOR q=0 TO 19:READ a,b,c,d,e,f,g,h:SYMBOL 129+q,a,b,c,d,e,f,g,h:NEXT q:RETURN
9220 DATA 170,8,62,79,127,63,146,127,130,13,14,251,244,192,0,128,255,254,250,248,248,240,208,128,255,158,12,8,8,0,0,0,255,127,95,31,31,15,11,1,0,0,36,0,36,0,0,0,254,254,254,0,191,191,191,0,126,24,44,94,191,191,223,126,60,126,255,126,255,126,255,255
9230 DATA 60,102,223,191,191,255,126,60,28,56,28,56,28,56,28,56,24,12,6,6,6,70,126,0,0,0,129,0,129,0,0,0,0,0,0,24,36,36,24,189,171,213,171,213,171,213,171,213,60,36,24,126,24,60,36,102,24,36,36,24,189,126,36,102,170,255,255,136,85,34,85,136
9240 DATA 12,240,14,129,255,255,255,255,0,0,0,192,248,255,255,255
Title: Re: Study of 464 Only Game Helicopter / Destination Saturn from ACU.
Post by: AMSDOS on 09:47, 06 April 19
Level 7 & 8 of this game, has been written in a very unusual way. Following the original Source code from ACU, if the funny looking vehicle you have in those levels reaches the end of the screen, the game STOPs exiting back to BASIC. In Level 7 if your vehicle is slightly out of alignment (one part over the hole, the other not), the game also STOPs there.
For Level 7 the original code is again using TXT RD CHAR to detect this gap that you need to be in align of to reach Level 8, I think that's very odd when all it needs to work is a single variable and a check with variable 'x', if they don't align up it's Game Over, otherwise proceed to the next level, this simple check has made Line 6090 redundant.


So here's the original code that I stripped down:




8 ENV 1,5,3,5:ENV 2,15,-1,4:ENT 1,15,-1,4
9 GOSUB 9200:GOSUB 9000
6000 MODE 1:INK 0,0:BORDER 1:INK 1,26:PEN 1:PAPER 0:CLS
6010 INK 2,9:INK 3,18:FOR f=15 TO 20:FOR q=1 TO 40 STEP 2:PAPER INT(RND*2)+2:PEN 0:LOCATE q,f:PRINT"  ":NEXT q:NEXT f
6020 LOCATE 1,14:INK 4,17:PEN 4:PAPER 1:PRINT STRING$(40,146)
6030 FOR f=15 TO 20:LOCATE 16,f:PEN 1:PAPER 0:PRINT"                    ":NEXT f
6040 LOCATE INT(RND*20)+15,14:PRINT"  "
6050 x=1
6060 LOCATE x,1:PEN 1:PRINT CHR$(147)CHR$(148):a=x
6061 SOUND 1,3000,1,7,0,0,15
6065 IF INKEY(9)=0 THEN GOTO 6080
6070 LOCATE a,1:PRINT"  "
6074 x=x+1:IF x=40 THEN STOP
6075 GOTO 6060
6080 FOR f=1 TO 13:LOCATE x,f:PRINT CHR$(147)CHR$(148):SOUND 2,223,10,15,2,1,1:FOR q=1 TO 200:NEXT q:LOCATE x,f:PRINT"  ":NEXT f
6085 LOCATE x,14:CALL &A000:IF CHR$(PEEK(&A007))<>" " THEN END
6090 LOCATE x+1,14:CALL &A000:IF CHR$(PEEK(&A007))<>" " THEN STOP
6095 GOTO 7000
7000 WINDOW #1,1,40,21,25:PEN#1,9:PAPER #1,10:INK 9,5:INK 10,23:CLS#1:LOCATE#1,16,1:PRINT#1,"WELL DONE!":LOCATE #1,11,3:PRINT#1,"Phase >7< Completed.":FOR d=1 TO 8:SOUND 4,106,-1,0,1,1,15:NEXT:FOR f=1 TO 3500:NEXT f:END
9000 RESTORE 9010:FOR f=0 TO 6:READ a$:POKE &A000+f,VAL("&"+a$):NEXT:RETURN
9010 DATA cd,60,bb,32,07,a0,c9
9200 SYMBOL AFTER 129
9210 RESTORE 9220:FOR q=0 TO 19:READ a,b,c,d,e,f,g,h:SYMBOL 129+q,a,b,c,d,e,f,g,h:NEXT q:RETURN
9220 DATA 170,8,62,79,127,63,146,127,130,13,14,251,244,192,0,128,255,254,250,248,248,240,208,128,255,158,12,8,8,0,0,0,255,127,95,31,31,15,11,1,0,0,36,0,36,0,0,0,254,254,254,0,191,191,191,0,126,24,44,94,191,191,223,126,60,126,255,126,255,126,255,255
9230 DATA 60,102,223,191,191,255,126,60,28,56,28,56,28,56,28,56,24,12,6,6,6,70,126,0,0,0,129,0,129,0,0,0,0,0,0,24,36,36,24,189,171,213,171,213,171,213,171,213,60,36,24,126,24,60,36,102,24,36,36,24,189,126,36,102,170,255,255,136,85,34,85,136
9240 DATA 12,240,14,129,255,255,255,255,0,0,0,192,248,255,255,255



and after making the modifications:




8 ENV 1,5,3,5:ENV 2,15,-1,4:ENT 1,15,-1,4
9 GOSUB 9200
6000 MODE 1:INK 0,0:BORDER 1:INK 1,26:PEN 1:PAPER 0:CLS
6010 INK 2,9:INK 3,18:FOR f=15 TO 20:FOR q=1 TO 40 STEP 2:PAPER INT(RND*2)+2:PEN 0:LOCATE q,f:PRINT"  ":NEXT q:NEXT f
6020 LOCATE 1,14:INK 4,17:PEN 4:PAPER 1:PRINT STRING$(40,146)
6030 FOR f=15 TO 20:LOCATE 16,f:PEN 1:PAPER 0:PRINT"                    ":NEXT f
6040 h=INT(RND*20)+15:LOCATE h,14:PRINT"  "
6050 x=1
6060 LOCATE x,1:PEN 1:PRINT CHR$(147)CHR$(148):a=x
6061 SOUND 1,3000,1,7,0,0,15
6065 IF INKEY(9)=0 THEN GOTO 6080
6070 LOCATE a,1:PRINT"  "
6074 x=x+1:IF x=40 THEN STOP
6075 GOTO 6060
6080 FOR f=1 TO 13:LOCATE x,f:PRINT CHR$(147)CHR$(148):SOUND 2,223,10,15,2,1,1:FOR q=1 TO 200:NEXT q:LOCATE x,f:PRINT"  ":NEXT f
6085 LOCATE x,14:IF x<>h THEN END
6095 GOTO 7000
7000 WINDOW #1,1,40,21,25:PEN#1,9:PAPER #1,10:INK 9,5:INK 10,23:CLS#1:LOCATE#1,16,1:PRINT#1,"WELL DONE!":LOCATE #1,11,3:PRINT#1,"Phase >7< Completed.":FOR d=1 TO 8:SOUND 4,106,-1,0,1,1,15:NEXT:FOR f=1 TO 3500:NEXT f:END
9200 SYMBOL AFTER 129
9210 RESTORE 9220:FOR q=0 TO 19:READ a,b,c,d,e,f,g,h:SYMBOL 129+q,a,b,c,d,e,f,g,h:NEXT q:RETURN
9220 DATA 170,8,62,79,127,63,146,127,130,13,14,251,244,192,0,128,255,254,250,248,248,240,208,128,255,158,12,8,8,0,0,0,255,127,95,31,31,15,11,1,0,0,36,0,36,0,0,0,254,254,254,0,191,191,191,0,126,24,44,94,191,191,223,126,60,126,255,126,255,126,255,255
9230 DATA 60,102,223,191,191,255,126,60,28,56,28,56,28,56,28,56,24,12,6,6,6,70,126,0,0,0,129,0,129,0,0,0,0,0,0,24,36,36,24,189,171,213,171,213,171,213,171,213,60,36,24,126,24,60,36,102,24,36,36,24,189,126,36,102,170,255,255,136,85,34,85,136
9240 DATA 12,240,14,129,255,255,255,255,0,0,0,192,248,255,255,255



When I get around to putting the game back together, I'm going to be using my own variations of this level which offers a slightly easier version of this which won't STOP the game, if anything it'll be game over after you have been given 3 chances to align up with the hole.


Level 8 as I mention above also shares similar aspects to Level 7 where the game STOPs when your vehicle reaches the end of the screen. As with Level 7, I'll be adding some chances to allow the player to correctly time when the vehicle needs to land on the Landing Pad, instead of having a game which just STOPs. Fortunately for Level 8, TXT RD CHAR wasn't used here, so the Level will work on All CPCs.




8 ENV 1,5,3,5:ENV 2,15,-1,4:ENT 1,15,-1,4
9 GOSUB 9200
7010 MODE 1:INK 0,20:INK 1,0:PEN 1:PAPER 0:CLS
7020 PAPER 2:INK 2,15:FOR f=18 TO 20:LOCATE 1,f:PRINT SPACE$(40):NEXT f:PAPER 0
7030 pl=INT(RND*20)+19:LOCATE pl,18:PEN 3:INK 3,3:PAPER 2:PRINT CHR$(146)CHR$(146):PAPER 0:PEN 1
7040 LOCATE 1,3:PEN 1:PAPER 2:PRINT CHR$(135)CHR$(135):PEN 1:PAPER 0
7050 x=1:y=2:dd=0
7055 LOCATE x,y:PEN 1:PAPER 0:PRINT CHR$(147)CHR$(148)
7060 IF INKEY(9)<>0 THEN 7060
7065 LOCATE x,y:PRINT CHR$(147)CHR$(148)
7070 a=x:b=y:x=x+1:IF x=40 THEN STOP
7075 IF dd=0 AND INKEY(9)<>0 THEN dd=1
7080 IF dd=1 THEN y=y+1:IF y=18 THEN 7100
7085 LOCATE a,b:PRINT"  "
7090 GOTO 7065
7100 IF x=pl+1 THEN WINDOW #1,1,40,21,25:PEN#1,9:PAPER#1,10:INK 9,0,26:SPEED INK 20,20:INK 10,23:CLS#1:LOCATE#1,10,2:PRINT#1,"FINAL PHASE COMPLETED.":FOR d=0 TO 26:INK 0,d:SOUND 4,106,-1,15,1,1,15:NEXT:FOR f=1 TO 3500:NEXT f:END
7110 END
9200 SYMBOL AFTER 129
9210 RESTORE 9220:FOR q=0 TO 19:READ a,b,c,d,e,f,g,h:SYMBOL 129+q,a,b,c,d,e,f,g,h:NEXT q:RETURN
9220 DATA 170,8,62,79,127,63,146,127,130,13,14,251,244,192,0,128,255,254,250,248,248,240,208,128,255,158,12,8,8,0,0,0,255,127,95,31,31,15,11,1,0,0,36,0,36,0,0,0,254,254,254,0,191,191,191,0,126,24,44,94,191,191,223,126,60,126,255,126,255,126,255,255
9230 DATA 60,102,223,191,191,255,126,60,28,56,28,56,28,56,28,56,24,12,6,6,6,70,126,0,0,0,129,0,129,0,0,0,0,0,0,24,36,36,24,189,171,213,171,213,171,213,171,213,60,36,24,126,24,60,36,102,24,36,36,24,189,126,36,102,170,255,255,136,85,34,85,136
9240 DATA 12,240,14,129,255,255,255,255,0,0,0,192,248,255,255,255



The controls in this case is the COPY key, for Level 7 your Vehicle moves automatically, it's up to you to decide when to Press the COPY key when over the Hole. For Level 8 it's just the Opposite, Holding down COPY moves your Vehicle, releasing COPY and your vehicle moves diagonally to the area you need to land on, at which point you have no control and can only hope you released COPY in the right spot.
Title: Re: Study of 464 Only Game Helicopter / Destination Saturn from ACU.
Post by: AMSDOS on 01:13, 21 April 19
I've had further headaches while trying to put this game back together, both something which is more like the Original (for Kukulcan) and a slightly easier version that I've created to make it slightly easier to get through the game.


The game seems to reach a point after it's been played a lot when a MEMORY FULL error occurs. Initially I thought the SYMBOL table might of been the Culprit because the SYMBOL table code gets defined every-time the Player presses 'P' to Play the Game at Line 8. I changed this so that it would only be executed in the initial setup stage of the Game (before GOTO <the title screen>), but this didn't fix the problem!  >:(


It seems the problem itself are the Variables themselves, while during my recoding of the game to work on all CPCs, on most of the Levels which were using TXT RD CHAR were replaced with an 2D array solution, I was careful enough to ERASE each array when they weren't required, I'm unsure if me setting up a new array at each more Level Section is the problem, when MEMORY FULL eventuated I found I couldn't ERASE <array>, though things like PRINT f wouldn't work either, the only way I could resolve that was with CLEAR.


The problem with CLEAR is it CLEARs everything, variables and Array's, the Hi-score Table would be CLEARed too, you don't really have a say in what Variables or Array's to clear, even though you can use ERASE <name of array> for that, but this game has no CLEAR in it and I'm hoping that's the Problem here. I've only been testing this game with BASIC 1.0 as well, so I'm unsure if my existing game eventually gets to a MEMORY FULL state in BASIC 1.1 since I've been reading that it's meant to have better waste management of variables, the game may continue to play without flaw.


The only solution I could come up with for this problem was to protect the Hi-score Table by Assigning some MEMORY to it and find some way of Storing and Retrieving the Information from it. Like the original levels I took the Title Screen, Hi-score Table and Separated them from the rest of the Game and this was what I had after removing some of the Externals which went to the Level:




4 GOSUB 9200
5 DIM hs$(20):DIM hs(20):FOR f=1 TO 20:hs$(f)="?????":hs(f)=1050-(f*50):NEXT f
6 DIM cc(7):FOR f=1 TO 7:cc(f)=f:NEXT f
7 RESTORE 7534:DIM co(7):FOR z=1 TO 7:READ q:co(z)=q:NEXT z:GOTO 9350


7500 MODE 0:INK 0,0:INK 1,26:BORDER 0:PEN 1:PAPER 0:CLS
7510 i=2:FOR f=3 TO 18:LOCATE f,1:PEN i:PRINT CHR$(138):GOSUB 7900:NEXT f
7520 FOR f=2 TO 25:LOCATE 18,f:PEN i:PRINT CHR$(138):GOSUB 7900:NEXT f
7525 FOR f=17 TO 3 STEP -1:LOCATE f,25:PEN i:PRINT CHR$(138):GOSUB 7900:NEXT f
7530 FOR f=24 TO 2 STEP -1:LOCATE 3,f:PEN i:PRINT CHR$(138):GOSUB 7900:NEXT f
7534 DATA 2,6,9,12,13,15,20
7540 GOSUB 7600
7542 FOR tl=1 TO 125
7545 FOR f=2 TO 8:INK f,co(cc(f-1)):NEXT f
7550 FOR f=1 TO 7:cc(f)=cc(f)+1:IF cc(f)=8 THEN cc(f)=1
7555 NEXT f
7560 NEXT tl:GOTO 9350
7600 INK 14,26:PEN 14:FOR f=1 TO 20:LOCATE 5,f+3:PRINT hs$(f):LOCATE 12,f+3:PRINT hs(f):NEXT f:RETURN
7900 i=i+1:IF i=9 THEN i=2
7901 RETURN


8500 MODE 1:INK 1,1:BORDER 1:INK 0,26:PEN 1:PAPER 0:CLS
8510 LOCATE 13,13:PRINT"You scored"sc
8520 for f=1 TO 20:IF sc>hs(f) THEN GOTO 8530
8525 NEXT f:FOR f=1 TO 3500:NEXT f:GOTO 9350
8530 FOR z=19 TO f STEP -1:hs(z+1)=hs(z):hs$(z+1)=hs$(z):NEXT z:hs(f)=sc
8535 LOCATE 1,15:PRINT" You have one of todays high scores!!!!  Please enter your name:"
8539 FOR q=1 TO 100:i$=INKEY$:NEXT q
8540 LOCATE 1,18:INPUT n$:IF LEN (n$)>5 THEN GOTO 8540
8545 IF n$="" THEN n$="ANON"
8550 FOR f=1 TO 3500:NEXT f:GOTO 7500


9200 SYMBOL AFTER 129
9210 RESTORE 9220:FOR q=0 TO 19:READ a,b,c,d,e,f,g,h:SYMBOL 129+q,a,b,c,d,e,f,g,h:NEXT q:RETURN
9220 DATA 170,8,62,79,127,63,146,127,130,13,14,251,244,192,0,128,255,254,250,248,248,240,208,128,255,158,12,8,8,0,0,0,255,127,95,31,31,15,11,1,0,0,36,0,36,0,0,0,254,254,254,0,191,191,191,0,126,24,44,94,191,191,223,126,60,126,255,126,255,126,255,255
9230 DATA 60,102,223,191,191,255,126,60,28,56,28,56,28,56,28,56,24,12,6,6,6,70,126,0,0,0,129,0,129,0,0,0,0,0,0,24,36,36,24,189,171,213,171,213,171,213,171,213,60,36,24,126,24,60,36,102,24,36,36,24,189,126,36,102,170,255,255,136,85,34,85,136
9240 DATA 12,240,14,129,255,255,255,255,0,0,0,192,248,255,255,255


9350 MODE 1:PEN 1:PAPER 0:INK 2,14:INK 3,20:BORDER 14:CLS
9355 FOR f=1 TO 25:PAPER 2:LOCATE 1,f:PRINT STRING$(40,135):NEXT f
9360 PEN 3:PAPER 0:LOCATE 10,2:PRINT"                    ":LOCATE 10,3:PRINT" DESTINATION SATURN ":LOCATE 10,4:PRINT"                    "
9365 LOCATE 9,22:PRINT" Written By Brian Round "
9370 PEN 1:FOR f=1 TO 40:LOCATE f,12:PRINT CHR$(143):LOCATE f,13:PRINT" ":LOCATE f,14:PRINT CHR$(143):NEXT f
9375 wr$="                                           You are Ivan Beurk,sent to saturn to rescue the saturnians,blow up the reactor which is causing all the trouble and rebuild their stricken world.                                          "
9385 DATA 716,0,716,758,851,956,956,851,758,716,568,638,0,716,638,426,0,426,478,478,0,0,0,536,0,536,568,568,0,0,0,358,358,379,0,379,426,478,478,478,478,536,536,478,0,426,478,536,568,638,716,0,716,0,0,0,0,0,0,0,0,255
9390 INK 0,26:INK 1,0:RESTORE 9385:FOR f=1 TO 198:LOCATE 1,13:PRINT MID$(wr$,f,40):READ a:IF a=255 THEN RESTORE 9385:READ a
9395 SOUND 1,a,20,15,2:SOUND 2,a+2,20,15,2:NEXT f
9400 wr$="                 Use the keys    Z-Left , X-Right , COPY-Up and <SPACE BAR>-Bomb(first screen only.)              P-Play.                      ***************GOOD LUCK****************"
9405 FOR f=1 TO 142:LOCATE 1,13:PRINT MID$(wr$,f,40):READ a:IF a=255 THEN RESTORE 9385:READ a
9410 SOUND 1,a,20,15,2:SOUND 2,a+4,20,15,2:NEXT f
9415 GOTO 7500



Lines 5-7 focus at setting up the Hiscore Table and some other array's are used which related the to Multicoloured blobs (a redefined character), which alternates the Colours to make them move in a Cycle on the MODE 0 Hi-Score Table Screen (Lines 7500-7901).


At the moment all I've done with my revised version is created a test example which works. Fingers crossed when I put this back into the Full Game it works. Line 7  has the Test Score in 'sc' before  going to 8500 where you enter your Name. Once they get stored into memory the Scores get stored at 2 Memory locations (even if the number is under 256), however the formula I've used to display the Scores correctly displays the number in the Hi-score Table. Once the process has been done, depending on if the Score was high enough to be a Hi-Score or not, I'm using CLEAR to wipe the Variables, I just hope it's enough to prevent any further MEMORY FULL errors.




4 GOSUB 9200
5 MEMORY &9FFF:FOR f=1 TO 20:a$="?????":FOR p=1 TO 5:POKE &9FF8+p+(f*7),ASC(MID$(a$,p,1)):NEXT p:r=(1050-(f*50))/16:hi=INT(r):lo=(r-hi)*16:POKE &9FFE+(f*7),lo:POKE &9FFF+(f*7),hi:NEXT f
6 FOR f=1 TO 7:POKE &A08F+f,f:NEXT f
7 RESTORE 7534:FOR z=1 TO 7:READ q:POKE &A096+z,q:NEXT z:sc=521:GOTO 8500:END:GOTO 9350


7500 MODE 0:INK 0,0:INK 1,26:BORDER 0:PEN 1:PAPER 0:CLS
7510 i=2:FOR f=3 TO 18:LOCATE f,1:PEN i:PRINT CHR$(138):GOSUB 7900:NEXT f
7520 FOR f=2 TO 25:LOCATE 18,f:PEN i:PRINT CHR$(138):GOSUB 7900:NEXT f
7525 FOR f=17 TO 3 STEP -1:LOCATE f,25:PEN i:PRINT CHR$(138):GOSUB 7900:NEXT f
7530 FOR f=24 TO 2 STEP -1:LOCATE 3,f:PEN i:PRINT CHR$(138):GOSUB 7900:NEXT f
7534 DATA 2,6,9,12,13,15,20
7540 GOSUB 7600
7542 FOR tl=1 TO 125
7545 FOR f=2 TO 8:INK PEEK(&A08E+f),PEEK(&A096+(f-1)):NEXT f
7550 FOR f=1 TO 7:POKE &A08F+f,PEEK(&A08F+f)+1:IF PEEK(&A08F+f)=8 THEN POKE &A08F+f,1
7555 NEXT f
7560 NEXT tl:CLEAR:GOTO 9350
7600 INK 14,26:PEN 14:FOR f=1 TO 20:LOCATE 5,f+3:FOR p=1 TO 5:PRINT CHR$(PEEK(&9FF8+p+(f*7)));:NEXT p:LOCATE 12,f+3:PRINT PEEK(&9FFF+(f*7))*16+PEEK(&9FFE+(f*7)):NEXT f:RETURN
7900 i=i+1:IF i=9 THEN i=2
7901 RETURN


8500 MODE 1:INK 1,1:BORDER 1:INK 0,26:PEN 1:PAPER 0:CLS
8510 LOCATE 13,13:PRINT"You scored"sc
8520 FOR f=1 TO 20:IF sc>PEEK(&9FFF+(f*7))*16+PEEK(&9FFE+(f*7)) THEN GOTO 8530
8525 NEXT f:FOR f=1 TO 3500:NEXT f:CLEAR:GOTO 9350
8530 FOR z=19 TO f STEP -1:POKE &9FFE+((z+1)*7),PEEK(&9FFE+(z*7)):POKE &9FFF+((z+1)*7),PEEK(&9FFF+(z*7)):FOR p=1 TO 5:POKE &9FF8+p+((z+1)*7),PEEK(&9FF8+p+(z*7)):NEXT p:NEXT z:r=sc/16:hi=INT(r):lo=(r-hi)*16:POKE &9FFE+(f*7),lo:POKE &9FFF+(f*7),hi
8535 LOCATE 1,15:PRINT" You have one of todays high scores!!!!  Please enter your name:"
8539 FOR q=1 TO 100:i$=INKEY$:NEXT q
8540 LOCATE 1,18:INPUT n$:IF LEN (n$)>5 THEN GOTO 8540
8545 IF n$="" THEN n$="ANON"
8546 FOR p=1 TO LEN(n$):POKE &9FF8+p+(f*7),ASC(MID$(n$,p,1)):NEXT p
8547 IF LEN(n$)<5 THEN FOR p=LEN(n$)+1 TO 5:POKE &9FF8+p+(f*7),32:NEXT p
8550 FOR f=1 TO 3500:NEXT f:GOTO 7500


9200 SYMBOL AFTER 129
9210 RESTORE 9220:FOR q=0 TO 19:READ a,b,c,d,e,f,g,h:SYMBOL 129+q,a,b,c,d,e,f,g,h:NEXT q:RETURN
9220 DATA 170,8,62,79,127,63,146,127,130,13,14,251,244,192,0,128,255,254,250,248,248,240,208,128,255,158,12,8,8,0,0,0,255,127,95,31,31,15,11,1,0,0,36,0,36,0,0,0,254,254,254,0,191,191,191,0,126,24,44,94,191,191,223,126,60,126,255,126,255,126,255,255
9230 DATA 60,102,223,191,191,255,126,60,28,56,28,56,28,56,28,56,24,12,6,6,6,70,126,0,0,0,129,0,129,0,0,0,0,0,0,24,36,36,24,189,171,213,171,213,171,213,171,213,60,36,24,126,24,60,36,102,24,36,36,24,189,126,36,102,170,255,255,136,85,34,85,136
9240 DATA 12,240,14,129,255,255,255,255,0,0,0,192,248,255,255,255


9350 MODE 1:PEN 1:PAPER 0:INK 2,14:INK 3,20:BORDER 14:CLS
9355 FOR f=1 TO 25:PAPER 2:LOCATE 1,f:PRINT STRING$(40,135):NEXT f
9360 PEN 3:PAPER 0:LOCATE 10,2:PRINT"                    ":LOCATE 10,3:PRINT" DESTINATION SATURN ":LOCATE 10,4:PRINT"                    "
9365 LOCATE 9,22:PRINT" Written By Brian Round "
9370 PEN 1:FOR f=1 TO 40:LOCATE f,12:PRINT CHR$(143):LOCATE f,13:PRINT" ":LOCATE f,14:PRINT CHR$(143):NEXT f
9375 wr$="                                           You are Ivan Beurk,sent to saturn to rescue the saturnians,blow up the reactor which is causing all the trouble and rebuild their stricken world.                                          "
9385 DATA 716,0,716,758,851,956,956,851,758,716,568,638,0,716,638,426,0,426,478,478,0,0,0,536,0,536,568,568,0,0,0,358,358,379,0,379,426,478,478,478,478,536,536,478,0,426,478,536,568,638,716,0,716,0,0,0,0,0,0,0,0,255
9390 INK 0,26:INK 1,0:RESTORE 9385:FOR f=1 TO 198:LOCATE 1,13:PRINT MID$(wr$,f,40):READ a:IF a=255 THEN RESTORE 9385:READ a
9395 SOUND 1,a,20,15,2:SOUND 2,a+2,20,15,2:NEXT f
9400 wr$="                 Use the keys    Z-Left , X-Right , COPY-Up and <SPACE BAR>-Bomb(first screen only.)              P-Play.                      ***************GOOD LUCK****************"
9405 FOR f=1 TO 142:LOCATE 1,13:PRINT MID$(wr$,f,40):READ a:IF a=255 THEN RESTORE 9385:READ a
9410 SOUND 1,a,20,15,2:SOUND 2,a+4,20,15,2:NEXT f
9415 GOTO 7500
Title: Re: Study of 464 Only Game Helicopter / Destination Saturn from ACU.
Post by: AMSDOS on 07:15, 26 April 19
I've sent Kukulcan updated versions of this game (one which follows the magazine version and my alternative version), which works on All CPCs, though here's my Alternative version, apart from being a little bit easier, I have only updated the MEMORY FULL problem on this version, should anyone want to see the other Magazine version with just the Recoding done to replace the TXT RD CHAR in it's entirety, otherwise this thread is a good guide on showing how to build up a BASIC Game and it may also help on a number of other 464 Games which don't play quite right on the other machines due to TXT RD CHAR.
Powered by SMFPacks Menu Editor Mod