Doh! ok, here it is:
Sync On
Sync Rate 30
Rem make matrix
Make matrix 1,5000,5000,20,20
Rem texture matrix
Load image "grass09.bmp",1
Prepare matrix texture 1,1,2,2
Rem Randomize the matrix
randomize matrix 1,250
Rem Place random texture on each matrix tile
For x = 0 to 19
For z = 0 to 19
t = rnd(3)+1
Set Matrix Tile 1,x,z,t
Next z
Next x
Rem Update the changes to the matrix
update matrix 1
Rem Make player pawn
Load image "barry.bmp",2
Make object sphere 10,25
Texture object 10,2
position object 10,100,5000,100
Rem Main loop
Do
set cursor 0,0
print screen fps()
Rem Store Object angle
AngleY# = object angle Y(10)
Rem Control input for camera
If Upkey()=1
XTest# = Newxvalue(X#,AngleY#,20)
ZTest# = Newzvalue(Z#,AngleY#,20)
If XTest#>0 and XTest#<10000 and ZTest#>0 and ZTest#<10000
Move object 10,10
Endif
Endif
If Leftkey()=1 then move object left 10,10
If Rightkey()=1 then move object right 10,10
If DownKey()=1 then move object 10,-10,
if spacekey()=1 then position object 10, X#,Y#,Z#+25
X# = Object position x(10)
Z# = Object position z(10)
Y# = Get Ground Height(1,X#,Z#)
Position object 10,X#,Y#+12.5,Z#
CameraZ# = Newzvalue(Z#,AngleY#-180,100)
CameraX# = Newxvalue(X#,AngleY#-180,100)
CameraY# = Get Ground Height(1,CameraX#,CameraZ#)
Position camera CameraX#,CameraY#+300,CameraZ#
Point camera X#,Y#+25,Z#
Rem Refresh Screen
Sync
Loop
Thanks guys!