home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AMOS PD CD
/
amospdcd.iso
/
126-150
/
apd130
/
woodball.bak
/
woodball.amosSourceCode
< prev
Wrap
AMOS Source Code
|
1987-06-04
|
9KB
|
314 lines
Rem ***************************************
Rem * *
Rem * Made by: Patrik Holmstr�m 1990 *
Rem * using AMOS *
Rem * Contact me: 5:e Bjurhovdag.37 *
Rem * 723 53 V�STER�S *
Rem * SWEDEN *
Rem * *
Rem ***************************************
Rem
Rem * Thanks to Frasse for his support
Rem * Hi to Ronny,Patrik,Per,Claes,Johan,Johnny and the rest.
Close Workbench : Close Editor
Change Mouse 2
Dim JX(16),JY(16)
For I=1 To 15 : Read X,Y : JX(I)=X : JY(I)=Y : Next I
Screen Open 0,320,256,32,0
Rem **************** Inledning ************************
Screen Open 1,320,256,32,0
Get Disc Fonts
Input "Do you have 1 meg.(y/n)?";A$
If A$="y" Then M=1 Else M=0
If M=1 Then Set Talk 0,0,70,100
Cls 1
NYTT:
Sprite Off
Set Font 1
Text 12,60," The Wooden Ball v1,00"
If M=1 Then Say "The Wooden Ball.",0
Sam Play 1,10,3000
Wait 100
Text 14,90," A shareware game"
Wait 100
Text 14,110,"Made by Patrik Holmstr�m 1990"
Text 13,130," Using AMOS"
Wait 100
Locate 0,19
OMIGEN:
Cls
Print : Print : Input " Do you wish instructions(n/y)?";Q$
If Q$="y" Then Goto INST
If Q$="Y" Then Goto INST
If Q$="n" Then Goto STAR
If Q$="N" Then Goto STAR
Goto OMIGEN
STAR:
Locate 0,20
Input " Players 1 or 2:";SPEL
HEJ:
If SPEL=1 Then Input " Level 0 to 5:";SG : SG=SG+5 : Goto PATRIK
If SPEL=2 Then Goto PATRIK
Cls : Goto STAR
PATRIK:
If SG>10 Then Goto HEJ
Input " Ball speed 1 to 3 (3=fastest):";B
If B>3 Then Goto PATRIK
If B<1 Then Goto PATRIK
KICKI:
Input " Game speed O to 9 (0=fastest):";SH : SH=SH*100
If SH>900 Then Goto KICKI
Print : Print " Please wait. Loading..."
GG:
L=11 : Rem bana
P1=0 : P2=0 : Rem poomts
BANABAKS:
For R=1 To 14
Sprite Off R
Next R
Load Iff "df0:spelplan",0
Load Iff "df0:spelplan",1
Screen Hide 0
Screen Hide 1
Wait 100
NYBANA:
Sprite 1,427,166,5
Sprite Off 13
Sprite Off 14
Limit Mouse 296,169 To 296,170
F1=0 : F2=0
SX=287 : SY=68 : Rem spelares start
BX=291 : BY=166 : Rem Bollstart
JX=287 : JY=263 : Rem 2spelarstart
Reserve Zone(1)
Set Zone 1,145,57 To 419,271 : Rem markerar veggar
X=0 : Y=0
Amal Off
Amal 3,"A 0,(1,1)(2,1)(3,1)(4,1)"
Amal 5,"A 0,(1,1)(2,1)(3,1)(4,1)"
Amal 11,"A 0,(6,2)(7,2)(8,2)"
Amal 12,"A 0,(6,2)(7,2)(8,2)"
Rem Amal 1,"Move 282-X,165-Y,32"
Make Mask
Sprite 3,287,68,1
Sprite 5,287,263,1
Sprite 12,286,274,6
Sprite 11,286,49,6
Sprite 10,187,135,L
Screen Show 1
Screen Show 0
Sam Play 4,1,10000
Paper 2
Pen 6
Locate 2,0
Print P2;
Locate 2,31
Print P1;
Wait 10
For R=427 To 291 Step -1 : Sprite 1,R,, : Wait 1 : Next R
If M=1 Then Say "Begin.",0
Sam Play 4,11,4000
Wait 50
Amal On
Rem ******************** Huvudloopen ****************************
Rem ******************** Spelare1 ****************************
HLOOP:
For SS=0 To SH : Next SS
Q$=Inkey$ : If Q$="q" Then Sprite Off : Cls 1 : Goto NYTT
If Q$="p" Then Wait Key
A=Joy(1) and 15
Add SX,JX(A) : Add SY,JY(A)
VEGG:
Sprite 3,SX,SY,1
If Zone(X Sprite(3),Y Sprite(3)) Then Goto HIT : Rem kollar om veggkrock
Add SX,-JX(A) : Add SY,-JY(A) : Goto VEGG
Rem ******************** datorspelare **************************
HIT:
If SPEL=1
If F2=1
If JY<200
If JY>95-(SG*2)
Sprite Off 13
F2=0
X=0
Y=0
End If
End If
End If
Sprite 5,JX,JY,3
If BX=JX
Goto YLED
Else
If BX>JX
Add JX,1
Else
Add JX,-1
End If
End If
YLED:
If BY=JY-3
Goto VEGG3
Else
If BY>JY
If Rnd(10)<SG : Rem svarighetsgrad 1-10svarast
Add JY,2
Else
Add JY,1
End If
Else
Add JY,-2
End If
End If
VEGG3:
If Sprite Col(1,5 To 5)
Y=-2 : Add JY,-1 : Add BY,-2
If JX>288
X=-2
Else
X=2
End If
End If
Goto HIT2
End If
Rem ************************ spelare2 ************************
A=Joy(0) and 15
Add JX,JX(A) : Add JY,JY(A)
VEGG2:
Sprite 5,JX,JY,3
If Zone(X Sprite(5),Y Sprite(5)) Then Goto HIT2 : Rem kollar om veggkrock
Add JX,-JX(A) : Add JY,-JY(A) : Goto VEGG2
Rem ************************ Bollen **************************
HIT2:
Add BX,X*B : Add BY,Y*B
FAST:
Sprite 1,BX,BY,5
If BY<59 Then Y=-Y : BY=59 : F2=1 : Sprite 13,436,250,14 : Sam Play 4,14,4000 : Add BY,Y : Goto HLOOP : Rem Boll OM VEGGKROCK
If BY>279 Then Y=-Y : BY=279 : F1=1 : Sprite 14,436,70,14 : Sam Play 4,14,4000 : Add BY,Y : Goto HLOOP : Rem Boll OM VEGGKROCK
If BON=0 Then Add CC,1 : If CC=1000 Then Sprite 8,385,224,9 : Sam Play 2,2,4000 Else If CC=1100 Then Sprite 8,317,107,9 : CC=900 : Sam Play 2,2,4500
If Fire(0) and F2=1 Then X=0 : Sam Play 3,13,14000 : Y=0 : Sprite Off 13 : F2=0
If Fire(1) and F1=1 Then X=0 : Sam Play 3,13,14000 : Y=0 : Sprite Off 14 : F1=0
If BX<143 Then X=-X : BX=144 : Sam Play 4,14,4000 : Add BX,X : Goto HLOOP : Rem kollar om veggkrock
If BX>422 Then X=-X : BX=421 : Sam Play 4,14,4000 : Add BX,X : Goto HLOOP : Rem kollar om veggkrock
If Sprite Col(3,5 To 5) Then Gosub FIGHT
If Sprite Col(1,11 To 12) Then Goto GOAL
On BON Gosub BON1,BON2
If Sprite Col(8,3 To 5) Then Gosub BONUS
If Sprite Col(1,3 To 3) Then A=Joy(1) and 15 Else Goto SP2
Add BX,JX(A) : Add BY,JY(A) : X=JX(A) : Y=JY(A) : Sam Play 1,13,4000
SP2:
If Sprite Col(1,5 To 5) Then A=Joy(0) and 15 Else Goto ETREF
Add BX,JX(A) : Add BY,JY(A) : X=JX(A) : Y=JY(A) : Sam Play 1,13,4000
ETREF:
Goto HLOOP
Rem ************************ Slut Huvudloopen ********************
Rem
Rem ************************ Spelarkrock *************************
FIGHT:
If BON<>0 Then BON=0
For R=1 To 5
A=Joy(0) and 15
Add JY,2 : Sam Play 1,13,4000
Sprite 5,JX,JY,3
If Zone(X Sprite(5),Y Sprite(5)) Then Goto FIT3 Else Add JY,-13
FIT3:
A=Joy(1) and 15
Add SY,-2 : Sam Play 1,13,4000
Sprite 3,SX,SY,3
If Zone(X Sprite(3),Y Sprite(3)) Then Goto FIT2 Else Add SY,13
FIT2:
Next R : Return
Rem *********************** Byte av bana (maal) ******************
GOAL:
If Sprite Col(1,11 To 11) Then L=L+1
If Sprite Col(1,12 To 12) Then L=L-1
Sam Play 1,3,4000
If L=13 Then P1=P1+1 : Sam Play 2,1,4000 : JJ=1 : J=0 : LB=-1 : Goto MAAL
If L=9 Then P2=P2+1 : Sam Play 2,1,4000 : JJ=0 : J=1 : LB=1 : Goto MAAL
Fade 3
BON=0 : Sprite Off 8
Sprite 10,187,135,L
For R=1 To 40000 : Next R
Fade 3 To 0
Locate 2,0
Print P2;
Locate 2,31
Print P1;
Goto NYBANA
Rem ******************** Maal **************************
MAAL:
Sam Play 4,10,5000 : CC=0 : L=11
Locate 2,0
Print P2;
Locate 2,31
Print P1;
If P2-P1=3 Then Goto FLUT
If P1-P2=3 Then Goto FLUT
Wait 100
If M=0 Then Goto GULPS
If P1>P2 Then Say "Come On Player Two.",0
If P2>P1 Then Say "Come On Player One.",0
If P1=P2 Then Say "A Tough Game.",0
GULPS:
Fade 3 : Wait 100
Fade 3 To 0 : Goto NYBANA
FLUT:
Wait 100
Sam Play 4,11,3000
Wait 200
Locate 16,0
Print "GAME OVER."
If M=1 Then Say "Game Over.",0
Amal Off
Wait Key
Sprite Off
Cls 1
Goto NYTT
Rem ************************ Bonusgrej ****************************
BONUS:
If Sprite Col(8,3 To 3) Then BON=2 : Sprite Off 8 : CC=0 : Sam Play 3,10,6000
If Sprite Col(8,5 To 5) Then BON=1 : Sprite Off 8 : CC=0 : Sam Play 1,10,6000
Return
BON1:
A=Joy(0) and 15 : X=JX(A) : Y=JY(A) : Return
BON2:
A=Joy(1) and 15 : X=JX(A) : Y=JY(A) : Return
Rem ***************** Instructions ********************************
INST:
Cls
Locate 0,4
Print "Don't eat shit and talk to your mother at the same time."
Print "All she will tell you is that your mouthis full with it!"
Print : Print "By the way. If you want the latest version of this game, please";
Print " send me 40 Swedish Crowns and your adress."
Print "After that you always get the latest version";
Print " directly from me."
Print "I'll also send you a print of the prg."
Print
Print "Send it to: "
Print "Patrik Holmstr�m "
Print "5:e Bjurhovdag.37"
Print "723 53 V�ster�s"
Print "SWEDEN"
GULP:
Input " Real instructions (y/n)?";FF$
If FF$="Y" Then Goto OJ
If FF$="y" Then Goto OJ
If FF$="N" Then Cls : Goto STAR
If FF$="n" Then Cls : Goto STAR
Goto GULP
OJ:
Cls
Locate 0,4
Print "The game is in three areas:"
Print "DEFEND,CENTER and SCORE AREA"
Print "If the ball hits the other players"
Print "wall you can push the firebutton to"
Print "stop the ball."
Print "Take the bonus to controll the ball."
Print "Hitting the other player when he"
Print "controlls the ball - it's god..."
Print "You have to win with three points."
Print "Key(Q) quits. Key(P) pauses."
Print : Print "Press a key..." : Wait Key : Cls : Goto STAR
Data 0,-2,0,2,0,0,-2,0,-2,-2,-2,2
Data 0,0,2,0,2,-2,2,2,0,0,0,0,0,0,0,0,0,0,0