Why this ??
Because I needed more than 4 months to understand the way that works the texturing of each tile on the matrix.
After many many many questions unanswered & tried to understand complex codes, I finally get a nice & simply code to texture your matrix. Here's my contribution for all the new programmers!!
Rem Load your WHOLE texture bitmap
Load image "image.bmp",1
rem The creation of the matrix that will be 1100 pixels whide & 1100 pixel height separated in 35 tiles horizontally & 35 tiles vertically.
MAKE MATRIX 1,1100,1100,35,35
rem position the matrix on the 3d world
POSITION MATRIX 1,1200,100,0
rem Position the camera
POSITION CAMERA 2000,155,5
rem Get some height on the matrix
RANDOMIZE MATRIX 1,17
rem Prepares the matrix to receive texture
prepare matrix texture 1,1,35,35
rem this variable contains the whole matrix (35 tiles Height * 35 tiles width)
image = 35*35
Reduce the number of 36 (35 for the last step + 1 because the tiling beginns at 0)
image=image-36
rem Copy of the variable to use for the maths
image2=image
rem this variable stores the row of the matrix
OtherTile=0
rem Make a loop until the counter reaches 0
repeat
rem Counter from the tile 0 to the tile 34 (35 tiles)
for i=0 to 34
rem Call the tile of the matrix & give to him the texture
set matrix tile 1,i,Altrotile,image2
inc image2
next i
inc OtherTile,1
dec image,35
image2=image
until image=<0
UPDATE MATRIX 1
Hope it will be useful...
Guido
http://www.vues3d.com