How's this?
Feel free to ask questions.
set display mode 1024,768,32,1
sync on
autocam off
hide mouse
create bitmap 1,32,32
lock pixels
ink 0,0
box 0,0,32,32
ink rgb(255,255,255),0
line 15,0,15,31
line 16,0,16,31
line 0,15,31,15
line 0,16,31,16
unlock pixels
get image 1,0,0,32,32
delete bitmap 1
set current bitmap 0
sprite 1,screen width()/2,screen height()/2,1
offset sprite 1,15,15
hide sprite 1
make object sphere 1,10
for a=2 to 11
make object box a,rnd(20),rnd(20),rnd(20)
position object a,rnd(500),object size y(a)/2.0,rnd(500)
next a
make matrix 1,500,500,10,10
set matrix wireframe on 1
Speed#=1
do
set cursor 0,0
print screen fps()
if spacekey() then xrotate object 1,wrapvalue(object angle x(1)+mousemovey()/8.0) : else: xrotate object 1,0
yrotate object 1,wrapvalue(object angle y(1)+mousemovex()/8.0)
vx#=0 : vz#=0
if keystate(17) then inc vx#,Speed#*sin(object angle y(1)) : inc vz#,Speed#*cos(object angle y(1))
if keystate(31) then dec vx#,Speed#*sin(object angle y(1)) : dec vz#,Speed#*cos(object angle y(1))
if keystate(30) then inc vx#,Speed#*sin(object angle y(1)-90) : inc vz#,Speed#*cos(object angle y(1)-90)
if keystate(32) then dec vx#,Speed#*sin(object angle y(1)-90) : dec vz#,Speed#*cos(object angle y(1)-90)
position object 1,object position x(1)+vx#,5,object position z(1)+vz#
position camera 0,object position x(1),object position y(1),object position z(1)
rotate camera 0,object angle x(1),object angle y(1),object angle z(1)
if spacekey()
show sprite 1
else
hide sprite 1
xrotate camera 0,30
move camera 0,-25
endif
sync
loop
end