hide mouse
sync on
backdrop on
color backdrop rgb(0,0,0)
autocam off
`matrix style
make matrix 1,512,512,64,64
set matrix 1,0,0,0,0,50,1,50
randomize matrix 1,25
update matrix 1
make object cube 1,30
position object 1,50,50,50
do
`cube move
move_cube()
move_camera()
sync
loop
end
function move_cube()
`detect key
if upkey() = 1 then move object 1,1
if leftkey() =1 then turn object left 1,1
if rightkey() = 1 then turn object right 1,1
if downkey() = 1 then move object 1,-1
endfunction
function move_camera()
cubex = object position x(1)
cubey = object position y(1)
cubez = object position z(1)
set camera to follow cubex,cubey,cubez,25,90,60,1,0
endfunction