I'm just going to post the code. Hotmail won't let me send it. Nobody use this code anywhere without my premission. You can replace the objects and images with your own.
`--------------------------------------------
`Program Set Up
`--------------------------------------------
sync on
autocam off
disable systemkeys
`Set Arrays
dim xspeed#(1)
dim zspeed#(1)
dim yspeed#(1)
dim friction#(1)
dim speedin#(1)
dim gravity#(1)
`Load Images
load image "Grass.JPG",1
load image "Man.JPG",2
`Makes the world
make matrix 1,5000,5000,25,25
randomize matrix 1,100
prepare matrix texture 1,1,1,1
position matrix 1,0,0,0
update matrix 1
`Set Object's Variables(Properties)
x=2500
z=2500
y=get ground height(1,x,z)
friction#(1)=0.95
gravity#(1)=100.0
speedin#(1)=0.5
`Load 3D Model
load object "Man.x",1
texture object 1,2
scale object 1,5000,5000,5000
position object 1,x,y,z
set object frame 1,20
`Sets fog
color backdrop RGB(0,0,20)
fog on:fog color RGB(0,0,0)
fog distance 2000
`--------------------------------------------
`Main Program
`--------------------------------------------
do
`Checks if Arrowkey is Pressed
if upkey()=1 then up=1 else up=0
if downkey()=1 then down=1 else down=0
if leftkey()=1 then left=1 else left=0
if rightkey()=1 then right=1 else right=0
`Move Camera
Move_Camera
`Move Object
Move_Object(up,down,left,right)
`Update Screen
sync
loop
`--------------------------------------------
`Functions
`--------------------------------------------
Function Move_Camera
`Find Model's Cordinates
x=object position x(1)
y=object position y(1)
z=object position z(1)
a#=object angle y(1)
`Find New Camera Cordinates
cx=newxvalue(x,a#,300)
cz=newzvalue(z,a#,300)
cy=y+100
`Smooth Camera Movement
cx=curvevalue(cx,camera position x(),5)
cy=curvevalue(cy,camera position y(),5)
cz=curvevalue(cz,camera position z(),5)
`Prints Camera's xyz on screen
set cursor 500,20:print "CameraX = ";cx
set cursor 500,40:print "CameraY = ";cy
set cursor 500,60:print "CameraZ = ";cz
`Position Camera
position camera cx,cy,cz
point camera x,y,z
endfunction
Function Move_Object(up,down,left,right)
`Finds Object's Position Variables
x#=object position x(1)
y#=object position y(1)
z#=object position z(1)
a#=object angle y(1)
f=object frame(1)
`Moves in the selected direction
if up=1
xspeed#(1)=xspeed#(1)+newxvalue(0,a#+180,speedin#(1))
zspeed#(1)=zspeed#(1)+newzvalue(0,a#+180,speedin#(1))
f=f+1
endif
if down=1
xspeed#(1)=xspeed#(1)+newxvalue(0,a#+180,speedin#(1)*-1)
zspeed#(1)=zspeed#(1)+newzvalue(0,a#+180,speedin#(1)*-1)
f=f-1
endif
`Control Object Animation
if f <= 1 then f = 24
if f >= 25 then f = 1
set object frame 1,f
`Rotates in the selected direction
if left=1 then a#=a#-3.0:yrotate object 1,wrapvalue(a#)
if right=1 then a#=a#+3.0:yrotate object 1,wrapvalue(a#)
`Adds Friction
xspeed#(1)=xspeed#(1)*friction#(1)
zspeed#(1)=zspeed#(1)*friction#(1)
`Add gravity
yspeed#(1)=yspeed#(1)+gravity#(1)
`Updates the xyz cordinates
if up=1 or down=1 then x#=x#+xspeed#(1)
if up=1 or down=1 then z#=z#+zspeed#(1)
y#=y#-yspeed#(1)
`Finds the y cordinate
if y# < get ground height(1,x#,z#)
yspeed#(1)=0
y#=get ground height(1,x#,z#)
`Find Corner Cordinates
dist#=110
ta#=wrapvalue(a#-90):flx#=newxvalue(x#,ta#,dist#):flz#=newzvalue(z#,ta#,dist#)
ta#=wrapvalue(a#+90):frx#=newxvalue(x#,ta#,dist#):frz#=newzvalue(z#,ta#,dist#)
ta#=wrapvalue(a#-360):blx#=newxvalue(x#,ta#,dist#):blz#=newzvalue(z#,ta#,dist#)
ta#=wrapvalue(a#+360):brx#=newxvalue(x#,ta#,dist#):brz#=newzvalue(z#,ta#,dist#)
`Find the Height of the Corners
flh#=get ground height(1,flx#,flz#)
frh#=get ground height(1,frx#,frz#)
blh#=get ground height(1,blx#,blz#)
brh#=get ground height(1,brx#,brz#)
across#=((frh#-flh#)+(brh#-blh#))/5.0
length#=((blh#-flh#)+(brh#-frh#))/5.0
across#=curveangle(across#,object angle x(1),5)
length#=curveangle(height#,object angle z(1),5)
`Rotate the Object
rotate object 1,wrapvalue(length#),wrapvalue(a#),wrapvalue(across#)
endif
`Prints Object's xyz on screen
set cursor 0,20:print "ObjectX = ";x#
set cursor 0,40:print "ObjectY = ";y#
set cursor 0,60:print "ObjectZ = ";z#
`Position the Object
position object 1,x#,y#,z#
endfunction
Don't let life get you down, it will only get better.