Adventure
Games - Part II
by Peter Ellison
by Peter Ellison
Last issue 'Black Knight' was set up just by the designing of the castle on paper. In this issue brave Sir Lancelot will be created using player missile graphics. Also some creatures such as a dragon and a giant will also be made.
Lancelot since he is wearing Chain-mail armour will only be able to move eight spaces per move. This will be done in the final installment by having a machine language subroutine check the joystick each time and turn it off after one space has been made. This is very similar to the movement of Ali Baba(TM) which is an excellent system for any adventure. Last issue I said that was going to show you how to make the castle using data statements, instead I'm going to snow a few of the characters that will be used in the final program. I decided to do it this way so that the entire program would be in the third and final installment. This is so a person wouldn't be forced to buy back copies of the magazine.
The first character is one of a dragon. The listing below will draw a yellow dragon on the screen by using four players to do this. Coming from his mouth is a red tongue. By using the four players, larger characters can be created, and as you will see in the next issue, moved. Type in the program listing below.
Dragon
45 REM SET UP PLAYER/MISSILE BASE
50 I=PEEK(106)-8:POKE 54279,I
55 REM PLAYERS 0 AND 1
60 J=I*256+516:K=I*256+644
65 REM PLAYERS 2 AND 3
70 L=I*256+768:M=I*256+896
95 GRAPHICS 2
100 SETCOLOR 2,1l,6
105 COLOR 3
200 POKE 559,46
209 REM PLAYER 0
210 POKE J+1,0:POKE J+2,0
220 POKE J+3,1:POKE J+4,128:POKE J+5,252:POKE J+6,128
229 REM PLAYER 1
230 POKE K+1,1:POKE K+2,3:POKE K+3,2:POKE K+4,63:POKE K+5,3:POKE K+6,63
239 REM PLAYER 2
240 POKE L+4,128:POKE L+5,128:POKE L+6,128:POKE L+7,128:POKE L+8,131:POKE L+9,207
245 POKE L+10,255:POKE L+11,127:POKE L+12,63:POKE L+13,31:POKE L+14,12:POKE L+15,60:POKE L+16,240
249 REM PLAYER 3
250 POKE M+7,192:POKE M+8,240:POKE M+9,240:POKE M+10,248:POKE M+11,248:POKE M+12,252:POKE M+13,240:POKE M+14,60
255 POKE M+15,12:POKE M+16,15
475 REM DRAGOAN'S COLOR
480 POKE 704,50:POKE 705,41:POKE 706,43:POKE 707,43
483 REM DRAON POSITION
485 DRAGON=100
490 DPOS=DRAGON
510 POKE 53277,3
1229 REM POKE DRAGON TO SCREEN
1230 POKE 53248,DPOS:POKE 53249,DPOS:POKE 53250,DPOS+8:POKE 53251,DPOS+16
Since only one monster will be moving at a time it is easy to use four players for one monster. Below is the character data for four other creatures, one of them being poor Lancelot. By deleting lines 209-255 from the above program just the few lines can be added to show the images of the other characters in the game. Below is Lancelot.
Lancelot
210 POKE J+1,56:POKE J+2,68220 POKE J+3,130:POKE J+4,130:POKE J+5,84:POKE J+6,56:POKE J+7,16:POKE J+8,56:POKE J+9,16:POKE J+10,16
225 POKE J+11,40:POKE J+12,68
230 POKE K+1,0:POKE K+2,0:POKE K+3,40:POKE K+4,0:POKE K+5,16:POKE K+6,0:POKE K+7,0:POKE K+8,0
The next monster is one of a giant. This giant has a club in his hand in order to add to the graphics. To have the giant's club in the right position POKE 53250,DPOS+8 must be changed to POKE 53250,DPOS-8.
GIANT
209 REM PLAYER 0210 POKE J+1,62:POKE J+2,42
220 POKE J+3,54:POKE J+4,62:POKE J+5,8:POKE J+6,62:POKE J+7,28:POKE J+8,28:POKE J+9,128:POKE J+10,28:POKE J+11,28
225 POKE J+12,20:POKE J+13,20:POKE J+14,20:POKE J+15,20:POKE J+16,54
229 REM PLAYER 1
230 POKE K+2,20:POKE K+3,8:POKE K+6,65:POKE K+7,193:POKE K+8,194:POKE K+9,252:POKE K+10,64:POKE K+11,64
235 POKE K+12,64
239 REM PLAYER 2
240 POKE L+8,6:POKE L+9,7:POKE L+10,3:POKE L+11,1
The last two are that of a wolf and a mummy.
Wolf
REM PLAYER 0210 POKE J+1,32:POKE J+2,224: POKE J+3,32:POKE J+4,32:POKE J+5,63:POKE J+6,63:POKE J+7,63:POKE J+8,33
220 POKE J+9,33:POKE J+10,33
Mummy
209 REM PLAYER 0210 POKE J+1,2:POKE J+2,42:POKE J+3,28:POKE J+5,127:POKE J+7,93
220 POKE J+9,28:POKE J+11,20:POKE J+13,20
229 REM PLAYER 1
230 POKE K+2,20:POKE K+4,8:POKE K+6,93:POKE K+8,93:POKE K=10,20:POKE K+12,20:POKE K+14,54
In closing remember POKE 704 through POKE 707 can be changed to give Lancelot or the monsters a different color. Next issue will be the entire listing of the game 'Black Knight`, and believe me, it will be worth the wait. Until then, Happy Adventuring!