Commodore_Power-Play_1985_Issue_17_V4_N05_Oct_Nov

Page 102

QHItlE PROCRnmS Dogfight only with 255 rounds), and kills. The enemy plane will appear in a random position.

Now remember: the joystick controls your airplane,

not the enemy plane. But. if you roll your plane to the left, the bandit will appear to roll to the right. As you move to the left, he appears to move to the right. As you

pull back on the stick to climb, he appears to descend. This is because you have no horizon to guide you, so all motion is relative. You must maneuver your plane to bring him into your sight, then fire. If he is indeed

which describe the five sprites that are used to create the enemy plane. Instructions 95-115 give screen co

ordinates (X= 160. Y = 185) to the sprites. Notice that all

five sprites are co-located. Lines 120-155 provide the sample bandit rolling from loft to right below the initial

text until "R" is entered (line 160), Instructions 165-210 get the level, draw the data panel (SYS SI), and set up various graphics and data parameters.

The actual game loops come in instructions 215-265. The sprues are zeioed (line 215), initial coordinates are

within a certain distance from the center of the gun-

selected (line 220). and the time and ammo are exam

sight, his plane will suffer a bit and appear larger in youi windshield. If he has been hit once and is within half

guage subroutine which turns on the sprites, reads the

ined (line 225). Lino 280 branches to the machine lan

that distance when you fire that next lime, he will

joystick, decides how to move the sprites and whether

explode and you will get credit for a kill. If, at any time

hits or kills have been scored.

(i.e., too near the edge of the screen), he will disappear

If a kill has been made, line 235 will branch to lines 295-310. which give the explosion. Line 240 detects a

only to be replaced by another bandit When you run out

vertically off-screen sprite and returns to the beginning

of ammunition or time, the game is over.

of the game loop. Lines 245-255 update the horizontal

during the chaso, you allow him to get outside your view

coordinate and test it for being off screen. The data

pane! is updated (line 260). and control returns to the

How the Program Works Instructions 80-90 read in the data (lines 1000-1040)

Before typing in this program, read "How to Enter Programs."

Dogfight! 5

POKE

53280,6:POKE

10

POKE 53248,160 : POKE 53249,105 : POKE 53287,3'DCIR 100 POKE 53250,160 : POKE 53251,185 :

53253,185

110

POKE

POKE

53255,185

115

: POKE 53290,3'DCVD POKE 53256,1GB : POKE

53257,185

28

PRINT"PLUG JOYSTICK

25

[SPACE 2]REMEMBER: THE"'BAFI PHINT"JOYSTICK CONTROLS [YELLOIn] YOUK [WHITE]PLANE, AS SHOWN'"bAUQ

120

PRINT"iiY THE MOVEMENT OF

125

30

POKT

2.

THE

:

GUNSIGHT.[SPACE2]YOUk"'BASJ

35

PRINT

"SCORE

NUMBER

OF

IS

50

TIMES

PR1NT"LESS THE NUMBER OF SHOTS. [SPACÂŁ2]THE ENEMY" *BAQK 45 PRINT"LOOKS LIKE THE PLANE dELOW. TO SCORE

50

A"'BAGP

PRINT"KILL YOU MUST BRING ENEMY

THE

55

PRINT" INTO YOUK SIGHT AND tIRE.

60

(SPACE2]THE FIRST"'BAUQ PRINT"HIT CAUSES THE PLANE TO

65

ENLARGE; THE"lBAUM PRINT"SECQND HIT CAUSES

IT

70

PRINT"YOU

START WITH

255

ROUNDS

75 80

PRINT'PREES 'R* WHEN READY."'BANG FOR I = 16000 TO 16364 : POKE 1,0 : :

90

100

=' 1 TO 5

POKE

FOR

I

2040

=

+

B TO

: SP,

E

:

HEAD SP,U,E 250

+

HEAD

N

:

POKE

(25B+SP)*64+I-l,N

:

NEXT

J'LXMR

OCTOBER/NOVEMBER'85

SP'IIXOS

:

NEXT

1

TO

125

:

FOR M

=

1

TO 125

NEXT'FOYH

TO 125

135

POKE

:

FOR M =

1

TO 125

:

FOR M

1

TO 125

:

140

53269,8

NEXT'FOFI

POKE

53269,16

POKE 53269,a

:

FOR N

=

1

TO 125

NEXT'FOFJ

POKE

53269,4

:

FOk H

=

1

TO 125

:

FOR M

=

1

TO

NEXT1FOBF

POKE

160

: NEXT'FOYK GET ANS : It

165

120'EKIF S = 54272 :POKE

170

=

NEXT'fPWF

155

53269,2

:

ANS

=

125

I'HEN

POKE S+12,32

S+13,251:POKE

S+tf,15'HCNQ

PRINT"[CLEAR]":INPUT"LEVEL (1-10)";L:PR INT"[CLEAR]":PRINT :POKE 679,L:POKE 680,L+1'HSRO

NEXT'FQDK

85 FOR J

=

1

:

OF

f-i

=

15(3

AMMO."'BAJM

FOR

FOR M

:

TO

:

:

145

EXPLODE." 'BAffJ

53291,3'DCBI

POKE 53269,4 : NEXT1FObD

:

PLANE1" BAPL

POKE

:

130

KILLS,"'BADO

40

53254,160

PUKE 53269,1 : NEXT'FOXC POKE 53269,2 :

THE

53288,3'DCUC

POKE 53252,160 : POKE : POKE 53289,3'DCAH

:S2=Sl+54'IXNH

IN

POKE

105

I!"iPRINT1ESVO

S1=256*PEEK(46)+PEEK(45}-319

Q

95

53281,14

: PRINT" [CLEAK,WiITE,SPACE14] DOGFIGHT

time/ammo check. Lines 270-290 end the game.

175

POKE

180

PRINT

681,2*L TAB(35)

D'OhN5] "

X 185

:

SYS

Sl'DJGK

"TIME"

"SHOTS"

"[LEFT5,

" [ LEFT5,

" "KILLS";'CERQ TI$="GH00DU": POKE

662,ti


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.