Flashing Blade - that worked like a charm - thanks!
Dodo - dude your code did some strange things....
The camera starts off way up above the matrix. If you hit the downkey a couple of times, you can just about see the top of my two cubes sticking up out of the fog.
The w key now moves me down in a straight line (rather than forward in the direction the camera is pointing) - and vice versa for the s key.
I've no idea why it's doing that (I think I actually understand what your three lines are doing)...
Here's my code - try it out...
Sync On
Sync Rate 30
rem fog & background
Fog on
Fog distance 4000
Fog color RGB(128,128,128)
Color Backdrop RGB(128,128,128)
Rem make matrix
Make matrix 1,5000,5000,25,25
Rem texture matrix
Load image "C:Program FilesDark Basic SoftwareDark Basic
ProfessionalMediaTexturesgrass_t.bmp",1
Load image "C:Program FilesDark Basic SoftwareDark Basic
ProfessionalMediaTextureslead.bmp",2
Prepare matrix texture 1,1,2,2
Rem Randomize the matrix
randomize matrix 1,50
rem trying to put objects on the matrix
Rem Make cube
Make object cube 10,100
position object 10,600,25,600
Texture object 10,2
rem make second cube next to first one
make object cube 11,100
position object 11,700,50,600
texture object 11,2
rem setup camera
set camera range 1,10000
autocam off
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 Main loop
Do
Rem Control input for camera
If keystate(17) then Move camera 10
If keystate(31) then Move camera -10
If keystate(16) then turn Camera left 5
If keystate(18) then turn camera right 5
if upkey()=1 then pitch camera up 5
if downkey()=1 then pitch camera down 5
pX#=camera position x()
pZ#=camera position z()
YPos#=get ground height(1,pX#,pZ#)+15
position camera pX#,YPos#,pZ#
Rem Refresh Screen
Sync
Loop