here's the code:
set display mode 640,480,32
sync on : sync rate 50
hide mouse
backdrop off
center text 320,200,"Loading"
sync
set text font "courier new"
set text size 40
autocam off
make light 1
position light 1,0,40,0
position camera 0,190,-150
point camera 0,0,0
load object "base.3ds",10
make object sphere 1,50
position object 1,-45,100,0
load image "back.bmp",1
load music "mnu.mid",1
load music "2.mid",2
load music "lose.mid",3
load sound "explode.wav",1
color object 10,rgb(200,20,50)
color object 1,rgb(0,200,20)
loop music 1
start:
backdrop on
position object 1,-45,100,0
yrotate object 1,0
texture backdrop 1
while upkey()=0
center text 320,10,"Press Upkey to start"
sync
endwhile
stop music 1
play music 2
y=100
while object hit(1,10)=0
position object 1,-45,y,0
y=y-3
sync
endwhile
m#=1
s=0
do
move object 1,m#
if rightkey()=1 then turn object right 1,rnd(7)
if leftkey()=1 then turn object left 1,1
if object collision(1,10)=0 then y=y-5
position object 1,object position x(1),y,object position z(1)
m#=m#+.001
if object position y(1)<-5 then exit
s=s+1
center text 320,10,"Score:"
set text size 30
center text 320,50,str$(s)
set text size 40
sync
loop
x=object position x(1)
y=object position y(1)
z=object position z(1)
for y=y to -700 step -5
if object position x(1)<>0
if object position x(1)>0 then x=x-1
if object position x(1)<0 then x=x+1
endif
if object position z(1)<>0
if object position z(1)>0 then z=z-1
if object position z(1)<0 then z=z+1
endif
center text 320,10,"Score:"
set text size 30
center text 320,50,str$(s)
set text size 40
position object 1,x,y,z
sync
next y
stop music 2
play music 3
backdrop off
cls
set text size 50
center text 320,10, "GAME OVER"
set text size 40
center text 320,60,"Score:"
set text size 30
center text 320,100,str$(s)
sync
sleep 5300
stop music 3
backdrop on
color backdrop 0
hide object 1
load object "explode.3ds",20
scale object 20,150,150,150
set object speed 20,50
position object 20, 0,-700,0
play object 20
play sound 1
while spacekey()=0
set text size 50
center text 320,10, "GAME OVER"
set text size 40
center text 320,60,"Score:"
set text size 30
center text 320,100,str$(s)
sync
endwhile
hide object 20
show object 1
goto start
The rock has rolled!