Here is the full code.
Collision im not good at.its yours...
sync on
sync rate 50
hide mouse
make object sphere 11,2
playerzpos#=-10
for x = 1 to 10
make object sphere x,2
scale object x,50,50,50
next x
rem value 1 rotation angle clockwise with zero on the highest part of the circle
rem value 2 calculation angle counter-clockwise with zero on the right-est part of the circle
dim rotation(10,2)
for x = 1 to 10
rotationp1:
rotation(x,1)=rnd(270)
rem angle calculations
dra#=rotation(x,1)
rem convertion code(FROM ROTATION VALUE TO CALCULATION VALUE)
dr=dra#*100
if dr>=0 and dr<=9000
nr=9000-dr
endif
if dr>9000 and dr<=18000
nr=36000-(dr-9000)
endif
if dr<0 and dr>=-9000
nr=abs(dr)+9000
endif
if dr<-9000 and dr>-18000
nr=abs(dr)+9000
endif
nar#=nr
nar#=nar#/100
rotation(x,2)=nar#
if rotation(x,1)<120 or rotation(x,1)>240:goto rotationp1:endif
next x
dim ballxpos#(10)
ballxpos#(1)=0
ballxpos#(2)=-3
ballxpos#(3)=-7
ballxpos#(4)=15
ballxpos#(5)=-19
ballxpos#(6)=20
ballxpos#(7)=5
ballxpos#(8)=10
ballxpos#(9)=-12
ballxpos#(10)=8
dim ballzpos#(10)
for x = 1 to 10
ballzpos#(x)=20
next x
for p=1 to 10
position object p,ballxpos#(p),0,ballzpos#(p)
next p
score#=0
speed#=1
make object box 12,3,3,50
make object box 13,3,3,50
position object 12,22.5,0,0
position object 13,-22.5,0,0
rotate camera 0,0,0
position camera 0,40,0
point camera 0,0,0
do
if leftkey()=1:playerpos#=playerpos#-1:endif
if rightkey()=1:playerpos#=playerpos#+1:endif
if playerpos#>20:playerpos#=playerpos#-1:endif
if playerpos#<-20:playerpos#=playerpos#+1:endif
if upkey()=1:playerzpos#=playerzpos#+1:endif
if downkey()=1:playerzpos#=playerzpos#-1:endif
if playerzpos#>0:playerzpos#=playerzpos#-1:endif
if playerzpos#<-20:playerzpos#=playerzpos#+1:endif
position object 11,playerpos#,0,playerzpos#
objcol=object collision(11,0)
if objcol>0 and objcol<11:text 100,100,"Gameover!":sleep 1000:end:endif
for x=1 to 10
rotation(x,1)=wrapvalue(rotation(x,1))
rotation(x,2)=wrapvalue(rotation(x,2))
testx=ballxpos#(x)*100
if testx>2250 or testx<-2250
rotation(x,1)=rotation(x,1)+90
rotation(x,2)=rotation(x,2)+90
rotation(x,1)=wrapvalue(rotation(x,1))
rotation(x,2)=wrapvalue(rotation(x,2))
endif
yrotate object x,rotation(x,1)
elGato#=rotation(x,2)
X#=ballxpos#(x)
Z#=ballzpos#(x)
nux#=cos(elGato#)*speed#+X#
nuz#=sin(elGato#)*speed#+Z#
ballxpos#(x)=nux#
ballzpos#(x)=nuz#
testz=ballzpos#(x)*100
if testz<-2200
inc score#,1
ballzpos#(x)=30
endif
position object x,ballxpos#(x),0,ballzpos#(x)
next x
sync
loop
...