He wants to achieve this:
rem Scorpyo 2007
set display mode 1024,768,32
SYNC ON
SYNC RATE 60
backdrop on
color backdrop rgb(10,100,100)
autocam off
set global collision off
set text opaque
set ambient light 70
global x#,z#,a#,s#,y#,mymousex,mymousey
global cx#,cy#,cz#,ax#,ay#,camdist#
x#=0.0:z#=0.0:a#=0.0:s#=0.0:y#=0.0:mymousex=0:mymousey=0
cx#=0.0:cy#=0.0:cz#=0.0:ax#=0.0:ay#=0.0
camdist#=-100
gosub setupmatrix
gosub makebuilding
gosub makegun
gosub putgun
do
if inkey$()="e" then sync rate 0
if inkey$()="E" then sync rate 60
gosub printdata
cameracontrol()
SYNC
loop
rem -------------ROUTINES--------------------
function cameracontrol()
mymousex=mousemovex()
mymousey=mousemovey()
if mymousey>0
ax#=wrapvalue(ax#-2.0)
endif
if mymousey<0
ax#=wrapvalue(ax#+2.0)
endif
if mymousex<0
ay#=wrapvalue(ay#-2.0)
endif
if mymousex>0
ay#=wrapvalue(ay#+2.0)
endif
x#=newxvalue(x#,ay#,s#)
z#=newzvalue(z#,ay#,s#)
y#=get ground height(1,x#,z#)
if upkey()=1 and s#<1.2 then s#=s#+0.02
if downkey()=1 and s#>-1.2 then s#=s#-0.02
if inkey$()="ù" then s#=0.0
if inkey$()="à" then s#=10.0
cx#=newxvalue(x#,ay#,camdist#)
cz#=newzvalue(z#,ay#,camdist#)
cy#=y#+50
position camera cx#,cy#+camhgt#,cz#
yrotate camera ay#
xrotate camera ax#
endfunction
printdata:
set cursor 0,0
print "polys ",statistic(1)
print "frame rate=",screen fps()
print "x#= ",x#
print "y#= ",y#
print "z#= ",z#
print
print "cx#= ",cx#
print "cz#= ",cz#
print
print "ay#= ",ay#
print "ax#= ",ax#
print
return
rem -------------Characters----------------
makegun:
make object cube 10,10
scale object 10,100,100,400
set object 10,1,1,0,1,1,1
position object 10,x#,y#,z#
color object 10,rgb(10,10,140)
disable object zdepth 10
yrotate object 10,352
fix object pivot 10
return
putgun:
gunx#=newxvalue(cx#,ay#,50)
gunz#=newzvalue(cz#,ay#,50)
gun2z#=gunz#+sin(ay#)*-20
gun2x#=gunx#+cos(ay#)*20
position object 10,gun2x#,cy#-20,gun2z#
lock object on 10
return
rem matrix
setupmatrix:
rem ground textures
rem create texture
cls rgb(0,100,20)
inkcolor#=rgb(255,255,255)
line 0,0,0,250
line 1,1,1,250
line 2,2,2,250
line 0,0,250,0
line 1,1,250,1
line 2,2,250,2
line 0,0,250,250
line 0,250,250,0
rem next n
get image 2,0,0,250,250
rem Make landscape
landsize=4000:grid=30:mtxrandomize=30
make matrix 1,landsize,landsize,grid,grid
set matrix 1,1,0,0,1,1,1,1
position matrix 1,-2000,0,-1000
prepare matrix texture 1,2,1,1
randomize matrix 1,mtxrandomize
rem ***********
rem get ground done
update matrix 1
return
makebuilding:
make object cube 100,1000
scale object 100,100,150,100
position object 100,500,700,2000
return
end