Here is your function and an example of how to use it.
Change or add any image as needed
ink RGB(0,0,0),RGB(255,0,0)
color backdrop RGB(255,0,0)
set ambient light 80
sync on
sync rate 0
rem MakeMatrix(1,100,100,100,100,"foliage.BMP")
randomize timer()
MakeMatrix(1,1000,1000,100,100,"water02.jpg",1)
position matrix 1,-100,-100,-100
MakeMatrix(2,100,100,100,100,"metal.bmp",2)
position matrix 2,50,50,50
do
CONTROL CAMERA USING ARROWKEYS 0,10,10
randomize matrix 1,5
update matrix 1
randomize matrix 2,5
update matrix 2
text 5,5,str$(screen fps())
sync
loop
function MakeMatrix (n as integer,width as integer,height as integer, xtile as integer, ztile as integer, myimage as string, ImageNum as integer)
if matrix exist(n) then delete matrix n
Make matrix n,width,height,ztile,ztile
Load image MyImage,ImageNum,0
prepare matrix texture n,ImageNum,ztile,xtile
tilenum = 1
for z=0 to ztile-1
for x=0 to xtile-1
set matrix tile n,x,z,tilenum
inc tilenum
next x
next z
update matrix n
endfunction
Hope it helps
System
PIII 650 MZ H.P. Pavillion
394 Mem GeForce 4 400MX