Matrices don't have to be flat! You can set height of any vertex.
sync on : sync rate 60 : autocam off : randomize timer()
` how many cubes?
obj=30
` make a simple matrix texure
ink rgb(0,0,255),0
box 1,1,14,14
get image 1,0,0,16,16
ink rgb(255,255,255),0
` make a matrix
make matrix 1,1000,1000,32,32
prepare matrix texture 1,1,1,1
position camera 500,100,-200
` make some floating cubes
for f=1 to obj
make object cube f,10
position object f,rnd(1000),0,rnd(1000)
next f
a#=0
do
control camera using arrowkeys 0,5,2
` make waves!
a#=wrapvalue(a#+2)
for f=0 to 32
for g=0 to 32
set matrix height 1,f,g,50.0*sin(wrapvalue(a#+(f*10)-(g*5)))
next g
next f
` update height on matrix
update matrix 1
` move floating cubes to new position depending on matrix height
for f=1 to obj
x#=object position x(f)
z#=object position z(f)
h#=get ground height(1,x#,z#)
position object f,x#,h#,z#
next f
text 0,0,"FPS = "+str$(screen fps())
text 0,20,"Cursors to move around"
sync
loop
Boo!