here's a rudimental example...
Rem *
Rem * Author : Scorpyo
set display mode 800,600,16
hide mouse
autocam off
backdrop off
gosub createtexture
backdrop on
set global collision off
sync rate 0
set camera range 10,10000
x#=5000.0:y#=0.0:z#=5000.0
gosub makeplayer
gosub makematrix
gosub makeskysphere
set ambient light 80
sync on
rem *****MAIN LOOP******
do
gosub Playercontrol
x#=newxvalue(x#,a#,s#)
z#=newzvalue(z#,a#,s#)
rem position player
position object 1,x#,y#,z#
yrotate object 1,a#
rem position skysphere at player position
position object 2,x#,y#,z#
gosub update_camera
sync
loop
Playercontrol:
rem ****Character walk ****
if upkey()=1 and s#<12 then s#=s#+2
if downkey()=1 and s#>-12 then s#=s#-2
if leftkey()=1 then a#=wrapvalue(a#-4)
if rightkey()=1 then a#=wrapvalue(a#+4)
return
update_camera:
rem Position camera to the back of the character
cx#=newxvalue(x#,a#,-300)
cz#=newzvalue(z#,a#,-300)
cy#=80
position camera cx#,cy#,cz#
point camera x#,y#,z#
return
makeplayer:
make object cube 1,50
position object 1,x#,y#,z#
return
createtexture:
sky#=rgb(10,10,250)
cls sky#
inkcolor#=rgb(255,255,255)
for n=1 to 800
x=rnd(200)
y=rnd(200)
dot x,y,inkcolor#
next n
get image 2,0,0,200,200
wait key
return
makeskysphere:
make object sphere 2,5000
texture object 2,2
set object 2,1,0,0,1,1,1
return
makematrix:
make matrix 1,10000,10000,40,40
update matrix 1
return