Make an array of the type of ground each square of the array is.
dim track(50,50) as integer
for ix=1 to 50
for iz=1 to 50
track(ix,iz)=0
next iz
next ix
hide mouse
autocam off
sync on
set camera range 0.1,100000
ink rgb(255,0,0),0
box 0,0,10,10
ink rgb(0,255,0),0
box 10,0,20,10
get image 1,0,0,20,10
cls
make matrix 1,50,50,50,50
prepare matrix texture 1,1,2,1
set matrix trim 1,0.08,0.08
for ix=10 to 40
set matrix tile 1,ix,10,2
track(ix,10)=1
set matrix tile 1,ix,40,2
track(ix,40)=1
next ix
for iz=10 to 40
set matrix tile 1,10,iz,2
track(10,iz)=1
set matrix tile 1,40,iz,2
track(40,iz)=1
next iz
randomize matrix 1,2
update matrix 1
position camera 10.5,0,10.5
do
sync
control camera using arrowkeys 0,0.01,0.5
position camera camera position x(),get ground height(1,camera position x(),camera position z())+0.5,camera position z()
if track(int(camera position x()),int(camera position z()))=1
text 1,1,"On track"
endif
loop
Insanity is just a state of mind