here's something I did a while a go, its not brilliant and its not very complete (or well commented) but thought you might like a look
you will have to provide some sounds and BMP's or you could try and isolate and remove the need for them
let me know if it doesnt work.
spacekey = reset things
shiftkey and controlkey = alter camera view
set display mode 800,600,16
hide mouse
autocam off
sync rate 0
sync on
disable escapekey
backdrop off
draw to back
rem make floor, simple football pitch drawn in MS paint and textured onto a plane
load image "pitch.bmp",1
make object plain 31,750,500
position object 31,0,0,250
xrotate object 31,90
texture object 31,1
set object collision off 31
load sound "thump.wav",1:` ball being "kicked" sound
load sound "clapping.wav",2:` crowd sound
rem player1
make object sphere 1,10
scale object 1,80,110,110
color object 1,RGB(248,40,0)
rem paddles
make object box 2,7,2.5,0.5
yrotate object 2,40
color object 2,RGB(224,232,88)
make object box 3,7,2.5,0.5
yrotate object 3,140
color object 3,RGB(224,232,88)
rem player2
make object sphere 4,10
scale object 4,80,110,110
color object 4,RGB(32,16,232)
rem paddles
make object box 5,7,2.5,0.5
yrotate object 5,40
color object 5,RGB(224,232,88)
make object box 6,7,2.5,0.5
yrotate object 6,140
color object 6,RGB(224,232,88)
for x= 1 to 6
fix object pivot x
next x
load image "goal.bmp",3:`panel behind goal
load image "notgoal.bmp",4:` side panel
make object plain 7,750,20
position object 7,0,10,499
rotate object 7,0,180,0
texture object 7,4
make object plain 8,750,20
position object 8,0,10,1
rotate object 8,0,180,0
texture object 8,4
make object plain 9,500,20
position object 9,-374,10,250
rotate object 9,0,90,0
fix object pivot 9
texture object 9,3
set object 9,1,0,0
make object plain 10,500,20
position object 10,374,10,250
rotate object 10,0,270,0
fix object pivot 10
texture object 10,3
set object 10,1,0,0
rem make ball
make object sphere 20,4:` ball
make object plain 21,4,4:` shadow object
xrotate object 21,90
fix object pivot 21
set object collision off 21
load image "ballshadow.bmp",2:` black circle drawn in MS paint
texture object 21,2
set object 21,1,0,0
load image "tex/wire01seethru.bmp",5:` net texture
make object plain 22,153,19:`left goal
position object 22,-373.8,9.5,249
yrotate object 22,90
set object 22,1,0,0
make object plain 23,10,19
position object 23,-369,9.5,173
set object 23,1,0,0
make object plain 24,10,19
position object 24,-369,9.5,326
set object 24,1,0,0
make object plain 25,10,153
xrotate object 25,90
position object 25,-369,19,249
set object 25,1,0,0
set object collision off 25
make object plain 26,153,19:`right goal
position object 26,373.8,9.5,249
yrotate object 26,90
set object 26,1,0,0
make object plain 27,10,19
position object 27,369,9.5,173
set object 27,1,0,0
make object plain 28,10,19
position object 28,369,9.5,326
set object 28,1,0,0
make object plain 29,10,153
xrotate object 29,90
position object 29,369,19,249
set object 29,1,0,0
set object collision off 29
for x = 22 to 29
texture object x,5
next x
load image "crowd.bmp",6:` coloured dots created in MS paint
make object plain 32,900,100
position object 32,0,40,550
xrotate object 32,45
make object plain 33,900,100
position object 33,0,40,-55
xrotate object 33,135
make object plain 34,700,100
position object 34,-424,40,250
yrotate object 34,90
fix object pivot 34
zrotate object 34,45
make object plain 35,700,100
position object 35,424,40,250
yrotate object 35,270
fix object pivot 35
zrotate object 35,wrapvalue(object angle z(35)-45)
for x= 32 to 35
texture object x,6
if x<34 then scale object texture 6,0.5,1
set object collision off x
next x
rem make a roof, I put a roof on so I could use BACKDROP OFF to gain more frames per second
load image "roof.bmp",9:` any old texture will do
make object plain 36,2000,1000
position object 36,0,400,500
xrotate object 36,135
make object plain 37,2000,1000
position object 37,0,400,0
xrotate object 37,45
make object plain 38,1500,1000
position object 38,-250,250,250
yrotate object 38,90
fix object pivot 38
zrotate object 38,120
make object plain 39,1500,1000
position object 39,250,250,250
yrotate object 39,90
fix object pivot 39
zrotate object 39,60
make object plain 40,1000,750:`underfloor
position object 40,0,-2,250
xrotate object 40,90
color object 40,RGB(0,128,128)
for x= 36 to 40
set object collision off x
texture object x,9
scale object texture x,20,20
next x
remend
set camera range 1,1000
setup:
camflag=1
ingamesetup:
position object 20,0,100,250:` ball pos
position object 21,0,1,250:` shadow pos
show object 21
position object 1,-100,1,250:` pl1 pos
position object 4,100,1,250:` pl2 pos
for x= 1 to 6
rotate object x,0,0,0
next x
position camera 0,100,0
rem some misc variables
start=0
rot#=0.0
vel#=0.0
ballinarena=1
hitrightnet=0
hitleftnet=0
floorflag=0
set sound speed 1,11000
goalwait=0
rem main loop
do
`cls
rem Control pl1
if pl1speed#<0.0 then pl1speed#=0.0
rem forwards
if keystate(17)=1 and pl1speed#<1.0:pl1speed#=pl1speed#+0.01:endif
if keystate(17)=0 and pl1speed#>0.0 then pl1speed#=pl1speed#-0.03
rem backwards
if keystate(44)=1 then move object 1,-1
rem turning
if keystate(30)=1
yrotate object 1,wrapvalue(plang1y#-3)
yrotate object 2,wrapvalue(plang1y#-3)
yrotate object 3,wrapvalue(plang1y#-3)
if turning1#<0.4 then inc turning1#,0.1
endif
if keystate(32)=1
yrotate object 1,wrapvalue(plang1y#+3)
yrotate object 2,wrapvalue(plang1y#+3)
yrotate object 3,wrapvalue(plang1y#+3)
if turning1#<0.4 then inc turning1#,0.1
endif
rem Control pl2
if pl2speed#<0.0 then pl2speed#=0.0
rem forwards
if keystate(72)=1 and pl2speed#<1.0:pl2speed#=pl2speed#+0.01:endif
if keystate(72)=0 and pl2speed#>0.0 then pl2speed#=pl2speed#-0.03
rem backwards
if keystate(80)=1 then move object 4,-1
rem turning
if keystate(75)=1
yrotate object 4,wrapvalue(plang2y#-3)
yrotate object 5,wrapvalue(plang2y#-3)
yrotate object 6,wrapvalue(plang2y#-3)
if turning2#<0.4 then inc turning2#,0.1
endif
if keystate(77)=1
yrotate object 4,wrapvalue(plang2y#+3)
yrotate object 5,wrapvalue(plang2y#+3)
yrotate object 6,wrapvalue(plang2y#+3)
if turning2#<0.4 then inc turning2#,0.1
endif
rem ball position and angles
ballx#=object position x(20)
bally#=object position y(20)
ballz#=object position z(20)
bangx#=object angle x(20)
bangy#=object angle y(20)
bangz#=object angle z(20)
bx#=newxvalue(ballx#,bangy#,vel#)
by#=bally#
bz#=newzvalue(ballz#,bangy#,vel#)
rem Get latest pl1 position and angles
pl1x#=object position x(1)
pl1y#=object position y(1)
pl1z#=object position z(1)
plang1x#=object angle x(1)
plang1y#=object angle y(1)
plang1z#=object angle z(1)
rem dont let pl1 go beyond walls
if pl1z#>488:pl1z#=488:pl1speed#=0.2:endif
if pl1z#<5:pl1z#=5:pl1speed#=0.2:endif
if pl1x#>368:pl1x#=368:pl1speed#=0.2:endif
if pl1x#<-368:pl1x#=-368:pl1speed#=0.2:endif
right1x#=newxvalue(pl1x#,plang1y#+22,8)
right1z#=newzvalue(pl1z#,plang1y#+22,8)
position object 2,right1x#,pl1y#,right1z#
left1x#=newxvalue(pl1x#,plang1y#-22,8)
left1z#=newzvalue(pl1z#,plang1y#-22,8)
position object 3,left1x#,pl1y#,left1z#
rem get latest pl2 position and angles
pl2x#=object position x(4)
pl2y#=object position y(4)
pl2z#=object position z(4)
plang2x#=object angle x(4)
plang2y#=object angle y(4)
plang2z#=object angle z(4)
rem dont let pl2 go beyond walls
if pl2z#>488:pl2z#=488:pl2speed#=0.2:endif
if pl2z#<5:pl2z#=5:pl2speed#=0.2:endif
if pl2x#>367:pl2x#=367:pl2speed#=0.2:endif
if pl2x#<-367:pl2x#=-367:pl2speed#=0.2:endif
right2x#=newxvalue(pl2x#,plang2y#+22,8)
right2z#=newzvalue(pl2z#,plang2y#+22,8)
position object 5,right2x#,pl2y#,right2z#
left2x#=newxvalue(pl2x#,plang2y#-22,8)
left2z#=newzvalue(pl2z#,plang2y#-22,8)
position object 6,left2x#,pl2y#,left2z#
rem pl1 old position
oldpl1x#=object position x(1)
oldpl1y#=object position y(1)
oldpl1z#=object position z(1)
x1#=newxvalue(pl1x#,plang1y#,pl1speed#)
z1#=newzvalue(pl1z#,plang1y#,pl1speed#)
rem pl2 old position
oldpl2x#=object position x(4)
oldpl2y#=object position y(4)
oldpl2z#=object position z(4)
x2#=newxvalue(pl2x#,plang2y#,pl2speed#)
z2#=newzvalue(pl2z#,plang2y#,pl2speed#)
position object 1,x1#,pl1y#,z1#
position object 4,x2#,pl2y#,z2#
hit=object collision(20,0)
rem long sides
if hit = 7 and flag7=0
rotate object 20,bangx#,wrapvalue(object angle y(7)-bangy#),bangz#
vel#=vel#+0.01
flag7=1
set sound speed 1,12000:play sound 1
endif
if hit = 8 and flag8=0
rotate object 20,bangx#,wrapvalue(object angle y(8)-bangy#),bangz#
vel#=vel#+0.01
flag8=1
set sound speed 1,12000:play sound 1
endif
rem short sides
if hit=9 and flag9=0
rotate object 20,bangx#,wrapvalue(object angle y(9)-bangy#),bangz#
vel#=vel#+0.01
flag9=1
set sound speed 1,12000:play sound 1
endif
if hit=10 and flag10=0
rotate object 20,bangx#,wrapvalue(object angle y(10)-bangy#),bangz#
vel#=vel#+0.01
flag10=1
set sound speed 1,12000:play sound 1
endif
``````````````````````````````````````````````````````````````````````
if hit=22 and hitleftnet=0:`back of the right net
hitleftnet=1
hide object 21
vel#=0.0
goalwait=1
endif
if hit = 23 and flag23=0:`bottom side netting
rotate object 20,bangx#,wrapvalue(object angle y(23)-bangy#+180),bangz#
flag23=1
vel#=vel#+0.2:`not sure about this
set sound speed 1,12000:play sound 1
endif
if hit = 24 and flag24=0:`top side netting
rotate object 20,bangx#,wrapvalue(object angle y(24)-bangy#+180),bangz#
flag24=1
vel#=vel#+0.2:`not sure about this
set sound speed 1,12000:play sound 1
endif
if hit=26 and hitrightnet=0:`back of the left net
hitrightnet=1
hide object 21
vel#=0.0
goalwait=1
endif
if hit = 27 and flag27=0
rotate object 20,bangx#,wrapvalue(object angle y(27)-bangy#+180),bangz#
flag27=1
vel#=vel#+0.2:`not sure about this
set sound speed 1,12000:play sound 1
endif
if hit = 28 and flag28=0
rotate object 20,bangx#,wrapvalue(object angle y(28)-bangy#+180),bangz#
flag28=1
vel#=vel#+0.2:`not sure about this
set sound speed 1,12000:play sound 1
endif
``````````````````````````````````````````````````````````````````````
if hit<>7 then flag7=0
if hit<>8 then flag8=0
if hit<>9 then flag9=0
if hit<>10 then flag10=0
if hit<>1 then flag1=0
if hit<>4 then flag4=0
if hit<>23 then flag23=0
if hit<>24 then flag24=0
if hit<>27 then flag27=0
if hit<>28 then flag28=0
rem hit body of pl1
if hit=1 and flag1=0
yrotate object 20,wrapvalue(bangy#+180)
`xrotate object 20,wrapvalue(object angle x(1)-vel#)
flag1=1
set sound speed 1,11000
if soundtime#=0.0 then play sound 1
soundtime#=5.0
endif
rem hit body of pl2
if hit=4 and flag4=0
yrotate object 20,wrapvalue(bangy#+180)
`xrotate object 20,wrapvalue(object angle x(4)-vel#)
flag4=1
set sound speed 1,11000
if soundtime#=0.0 then play sound 1
soundtime#=5.0
endif
rem pl 1 paddles
if hit=2
yrotate object 20,wrapvalue(object angle y(1)+40)
if pl1speed#>1.0 then xrotate object 20,wrapvalue(object angle x(2)-(pl1speed#*30))
if pl1speed#=0.0:inc vel#,turning1#:else:vel#=pl1speed#+pl1speed#/2:endif
rot#=vel#/2
set sound speed 1,11000
if soundtime#=0.0 then play sound 1
soundtime#=5.0
endif
if hit=3
yrotate object 20,wrapvalue(object angle y(1)-40)
if pl1speed#>1.0 then xrotate object 20,wrapvalue(object angle x(3)-(pl1speed#*30))
if pl1speed#=0.0:inc vel#,turning1#:else:vel#=pl1speed#+pl1speed#/2:endif
rot#=vel#/2
set sound speed 1,11000
if soundtime#=0.0 then play sound 1
soundtime#=5.0
endif
rem if ball hits pl two's paddles
if hit=5
yrotate object 20,wrapvalue(object angle y(4)+40)
if pl2speed#>1.0 then xrotate object 20,wrapvalue(object angle x(5)-(pl2speed#*30))
if pl2speed#=0.0:inc vel#,turning2#:else:vel#=pl2speed#+pl2speed#/2:endif
rot#=vel#/2
set sound speed 1,11000
if soundtime#=0.0 then play sound 1
soundtime#=5.0
endif
if hit=6
yrotate object 20,wrapvalue(object angle y(4)-40)
if pl2speed#>1.0 then xrotate object 20,wrapvalue(object angle x(5)-(pl2speed#*30))
if pl2speed#=0.0:inc vel#,turning2#:else:vel#=pl2speed#+pl2speed#/2:endif
rot#=vel#/2
set sound speed 1,11000
if soundtime#=0.0 then play sound 1
soundtime#=5.0
endif
````````````````````````````````````````````````````````````````
if turning2#>0.0 then dec turning2#,0.05
if turning1#>0.0 then dec turning1#,0.05
if soundtime#>0.0 then dec soundtime#,1.0
rem make sure ball makes noise at start of game
if start=0 and floorflag=0 and by#=2.0:set sound speed 1,8000:play sound 1:floorflag=1:endif
rem make sure ball doesnt go below floor
if by#<2.0
by#=2.0
if vel#>0.0 then dec vel#,0.03:` if ball touches ground then slow it down
if floorflag=0:set sound speed 1,8000:play sound 1:floorflag=1:endif
start=1
position object 20,bx#,by#,bz#
endif
rem make sure ball arcs in the air and also place and size its shadow
if by#>2.0
rot#=rot#+0.01
xrotate object 20,wrapvalue(bangx#+rot#)
scale object 21,102-by#,102-by#,102-by#:` make shadow smaller the higher the ball goes
floorflag=0
if start=0:dec by#,1:position object 20,bx#,by#,bz#:endif
endif
if vel#<0.0 then vel#=0.0:` stop ball going into reverse
move object 20,vel#
rem place shadow
position object 21,bx#+1,0.2,bz#+1
if spacekey()=1 then goto ingamesetup
if shiftkey()=1 then camflag=0
if controlkey()=1 then camflag=1
rem camera stuff
if camflag=1
xcentre#=(pl1x#+pl2x#+bx#)/3
zcentre#=(pl1z#+pl2z#+bz#)/3
camx#=ballx#
camy#=100+camheight#
camz#=ballz#-200
if camy#>130 then camy#=130
if camz#<-20 and camy#<200 then inc camheight#,1
if camz#>-20 and camy#>100 then dec camheight#,1
if camz#<-50 then camz#=-50
position camera camx#,camy#,camz#
point camera xcentre#,0,zcentre#
endif
if camflag=0
set camera to follow pl2x#,pl2y#,pl2z#,plang2y#,50,20,50,0
point camera pl2x#,pl2y#,pl2z#
endif
if returnkey()=1:set cursor 200,10:print screen fps():endif
if goalwait=1
play sound 2
pl1speed#=0.0:pl2speed#=0.0:vel#=0.0
wait 3000
goto ingamesetup
endif
if scancode()=1 then gosub endprog
sync
loop
endprog:
for x=1 to 100
if object exist(x) then delete object x
if sound exist(x) then delete sound x
if matrix exist(x) then delete matrix x
if image exist(x) then delete image x
next x
end
return