You have to put all your tiles on a bmp file. Example 4 x 4 tiles
LOAD IMAGE "tileset.bmp",1
MAKE MATRIX 2,20,20,10,10 : Rem - makes a 20 x 20 matrix
PREPARE MATRIX TEXTURE 2,1,4,4
DELETE IMAGE 1
That way, you have the first tile of your bmp on all the matrix. Notice the two
4 after
PREPARE MATRIX TEXTURE, they are there for the number of tiles on your bmp. It means there are 4 tiles in the length of the bmp and 4 in the height of it ... So there are 16 Tiles in that BMP
If you wanna put some other tile from that BMP, you shall use
SET MATRIX TILE 2, x, y, TileNumber
UPDATE MATRIX 2
TileNumber = 1 would be the first tile
TileNumber = 2 would be the second tile on your bmp
etc.
x and y are there for the position on that matrix
"Begin at the beginning, and go on till you come to the end: then stop." - Lewis Carroll