home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AMOS PD CD
/
amospdcd.iso
/
sourcecode
/
games
/
speed_racers.amos
/
speed_racers.amosSourceCode
< prev
Wrap
AMOS Source Code
|
1993-01-06
|
2KB
|
89 lines
'
' *** SPEED RACERS ***
'
'
' ** THIS IS JUST A SIMPLE GAME, A BIT LIKE TRON, PLAYER ONE PLAYS WITH
' ** THE KEYBOARD :- UP = 'A' DOWN = 'Z' LEFT = 'N' RIGHT = 'M' ....
'
' ** PLAYER TWO PLAYS WITH THE JOYSTICK..
'
' ** THE FIRST PLAYER TO GET 5 POINTS WINS THE GAME...
'
' ** THE GAME's PRETTY NAFF REALLY !!!
'
5 Led Off : Music 1 : Wait 10 : Unpack 7 To 0
0 WTKY
For VV=63 To 1 Step -1 : Wait Vbl : Volume VV : Next VV : Music Off : Volume 63
'
1 Unpack 6 To 0 : SC1=0 : SC2=0 : LVL=1
2 X1=160 : Y1=54 : X2=160 : Y2=159 : D1=2 : D2=1 : W=500
Cls 1,5,5 To 314,208 : Gosub SC
On LVL Gosub L1
Do : A$=Upper$(Inkey$)
'
If A$="A" Then D1=1
If A$="Z" Then D1=2
If A$="N" Then D1=3
If A$="M" Then D1=4
'
If Jup(1) Then D2=1
If Jdown(1) Then D2=2
If Jleft(1) Then D2=3
If Jright(1) Then D2=4
'
If D1=1 Then Y1=Y1-1
If D1=2 Then Y1=Y1+1
If D1=3 Then X1=X1-1
If D1=4 Then X1=X1+1
'
If D2=1 Then Y2=Y2-1
If D2=2 Then Y2=Y2+1
If D2=3 Then X2=X2-1
If D2=4 Then X2=X2+1
'
Q=Point(X1,Y1) : If Q=0 or Q=2 or Q=3 or Q=4 or Q=5 or Q=7 Then Gosub DIE1 : Goto 2
Q=Point(X2,Y2) : If Q=0 or Q=2 or Q=3 or Q=4 or Q=5 or Q=7 Then Gosub DIE2 : Goto 2
'
W=W-0.001 : If W<0 Then W=0
Ink 4 : Plot X1,Y1 : Ink 7 : Plot X2,Y2
For Z=0 To W : Next Z : Loop
'
DIE1:
SC2=SC2+1 : B[101,220,218,244,"DEAD PLAYER 1",0,1] : Boom : Gosub WT : If SC2=5 Then Gosub SC : B[101,220,218,244,"PLAYER 2 WINS",0,1] : Gosub WT : Goto ED
Return
'
DIE2:
SC1=SC1+1 : B[101,220,218,244,"DEAD PLAYER 2",0,1] : Boom : Gosub WT : If SC1=5 Then Gosub SC : B[101,220,218,244,"PLAYER 1 WINS",0,1] : Gosub WT : Goto ED
Return
'
SC:
B[71,221,93,243,Str$(SC1)-" ",1,1] : B[227,221,248,243,Str$(SC2)-" ",1,1] : Return
'
WT:
For ZZ=0 To 50000 : Next ZZ : B[101,220,218,244,"",0,1] : Return
'
L1:
B[20,100,300,113,"",0,4]
Return
'
Procedure B[NX1,NY1,NX2,NY2,A$,IN,C]
If IN=1 Then C1=0 : C2=2 : Else C1=2 : C2=0
Ink 1 : Bar NX1,NY1 To NX2,NY2 : Ink C1 : Polyline NX2,NY1 To NX1,NY1 To NX1,NY2 : Ink C2 : Polyline NX1,NY2 To NX2,NY2 To NX2,NY1+1
Ink C : Bar NX1+1,NY1+1 To NX2-1,NY2-1
If A$<>""
WIDTH=Text Length(A$) : Ink 6,C : X7=(((NX2-NX1)/2)+NX1)-(WIDTH/2) : Text X7,((NY2-NY1)/2)+NY1+3,A$
End If
End Proc
'
HLP:
'
ED:
B[101,220,218,244,">PRESS A KEY<",1,1] : WTKY : Goto 5
'
Procedure WTKY
Clear Key
QQ$=""
Repeat
QQ$=Inkey$
Until QQ$<>""
End Proc