sync on : sync rate 30 : cls : hide mouse
gosub images
set gamma 100,100,255
make object sphere 4,6000
color object 4,rgb(100,100,60)
set object 4,1,1,0
set camera range 1,60000
make matrix 1,3000,3000,30,30
set mipmap mode 2
make matrix 3,3000,3000,30,30
position matrix 3,-1500,900,-1500
prepare matrix texture 3,3,1,1
prepare matrix texture 1,1,1,1
position matrix 1,-1500,700,-1500
make matrix 2,3000,3000,30,30
prepare matrix texture 2,2,1,1
position matrix 2,-1500,-700,-1500
make object sphere 1,0
make object box 2,10,50,10
make object box 3,10,50,10
make mesh from object 1,2
make mesh from object 2,3
delete object 2
delete object 3
add limb 1,1,1
add limb 1,2,2
offset limb 1,1,10,0,0
offset limb 1,2,-10,0,0
xrotate object 1,90
position camera 0,200,0
point camera 0,0,0
rotate limb 1,1,0,0,12
rotate limb 1,2,0,0,wrapvalue(-12)
set object keyframe 1,0
rotate limb 1,1,0,0,32
rotate limb 1,2,0,0,wrapvalue(-32)
offset limb 1,1,17,0,0
offset limb 1,2,-17,0,0
set object keyframe 1,2
rotate limb 1,1,0,0,52
rotate limb 1,2,0,0,wrapvalue(-52)
offset limb 1,1,22.5,0,0
offset limb 1,2,-22.5,0,0
set object keyframe 1,4
rotate limb 1,1,0,0,32
rotate limb 1,2,0,0,wrapvalue(-32)
offset limb 1,1,17,0,0
offset limb 1,2,-17,0,0
set object keyframe 1,6
offset limb 1,1,10,0,0
offset limb 1,2,-10,0,0
rotate limb 1,1,0,0,12
rotate limb 1,2,0,0,wrapvalue(-12)
set object keyframe 1,8
color object 1,rgb(52,52,52)
ghost matrix on 1
 
 
do
gosub keymove
gosub mouserotate
if rdmi=5 then randomize matrix 1,50 : rdmi=0
inc rdmi
position object 1,0,0,oz#
sync
loop
 
mouserotate:
position camera (camera position x()+mousemovex()),(camera position y()+mousemovey()),object position z(1)-20
point camera object position x(1),object position y(1),object position z(1)
if camera position y()>600 then position camera (camera position x()+mousemovex()),600,object position z(1)-20
if camera position y()<-600 then position camera (camera position x()+mousemovex()),-600,object position z(1)-20
if camera position x()>600 then position camera 600,camera position y(),object position z(1)-20
if camera position x()<-600 then position camera -600,camera position y(),object position z(1)-20
 
return
 
keymove:
if upkey()=1 then gosub up
if downkey()=1 then gosub down
return
 
down:
sh#=5.5
play object 1
repeat
if rdmi=5 then randomize matrix 1,50 : rdmi=0
inc rdmi
position camera (camera position x()+mousemovex()),(camera position y()+mousemovey()),object position z(1)-20
point camera object position x(1),object position y(1),object position z(1)
sync
until object frame(1)>4
for t=0 to 25
dec oz#,sh#
dec sh#,0.2
position object 1,0,0,oz#
position camera (camera position x()+mousemovex()),(camera position y()+mousemovey()),object position z(1)-20
point camera object position x(1),object position y(1),object position z(1)
if rdmi=5 then randomize matrix 1,50 : rdmi=0
inc rdmi
sync
next t
return
up:
sh#=5.5
play object 1
repeat
if rdmi=5 then randomize matrix 1,50 : rdmi=0
inc rdmi
position camera (camera position x()+mousemovex()),(camera position y()+mousemovey()),object position z(1)-20
point camera object position x(1),object position y(1),object position z(1)
sync
until object frame(1)>4
for t=0 to 25
inc oz#,sh#
dec sh#,0.2
position object 1,0,0,oz#
position camera (camera position x()+mousemovex()),(camera position y()+mousemovey()),object position z(1)-20
point camera object position x(1),object position y(1),object position z(1)
if rdmi=5 then randomize matrix 1,50 : rdmi=0
inc rdmi
sync
next t
return
images:
 
ink rgb(60,60,250),0
box 0,0,240,240
ink rgb(10,10,200),0
for t=0 to 100
a=rnd(240) : b=rnd(240)
box a,b,a+20,b+20
next t
get image 1,0,0,240,240
 
ink rgb(255,255,0),0
box 0,0,240,240
ink rgb(200,200,0),0
for t=0 to 900
a=rnd(240) : b=rnd(240)
box a,b,a+5,b+5
next t
get image 2,0,0,240,240
 
ink rgb(0,0,0),0
box 0,0,240,240
ink rgb(255,255,255),0
for t=0 to 200
a=rnd(240) : b=rnd(240)
box a,b,a,b
next t
get image 3,0,0,240,240
return