sorry, forgot to attach it
Rem Setup sync
Sync On
Sync Rate 30
Hide mouse
autocam off
Rem make matrix
Make matrix 1,10000,10000,20,20
position matrix 1,-500,-200,-500
Rem texture matrix
Load image "sand.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 Cubes for reference
For x = 1 to 5
Make object cube x,100
Position object x,Rnd(2000),0,Rnd(2000)
Set object collision to boxes x
Next x
Rem make the m4a1
load object "m4a1.3ds",10
yrotate object 10,353
scale object 10,25,25,25
set object collision to boxes 10
Rem Main loop
Do
Rem Store Object angle Y in aY#
aY# = Object angle Y(10)
Rem Control input for camera
If Upkey()=1 then Move object 10,20
If Leftkey()=1 then Yrotate object 10,Wrapvalue(aY#-5)
If Rightkey()=1 then Yrotate object 10,Wrapvalue(aY#+5)
X# = Object position x(10)
Z# = Object position z(10)
Rem position camera
position camera X#-50,62,Z#-125
Rem Refresh Screen after all dat stuff
Sync
Loop