rem ignore this bit....it just makes an image with the numbers 1 to 9 on it
set text size 20
number =1
for i=10 to 50 step 20
for l=10 to 50 step 20
text l,i,str$(number)
inc number
next l
next i
get image 1,0,0,69,69
rem a matrix of 3x3 tiles will hold the texture with the 9 numbers ok
make matrix 1,100,100,3,3
rem here we cut up the texture into 3x3 (9) chunks, the matrix is number 1 and the image is 1 as well
prepare matrix texture 1,1,3,3
rem this maps the tiles to the terrain correctly, for some weird reason DB maps the tiles back to front and inside out, this handles that
tile=1
rem counting backwards
for i=2 to 0 step -1
rem and inside to out (IMO )
for l=0 to 2
rem this takes one of the 9 "tiles" from the image and maps it to a position on the terrain
set matrix tile 1,l,i,tile
inc tile
next l
next i
rem here we update the matrix so that you can see the changes
update matrix 1
do
rem moving camera bit so you can see the result
if upkey() then move camera 0.1
if downkey() then move camera -0.1
if leftkey() then turn camera left 1
if rightkey() then turn camera right 1
loop
Hope thats some help to you, fill matrix will fill a matrix with the tile you specify, set matrix tile will apply a specific tile to a position on the matrix, prepare matrix texture cuts an image up into "tiles" that you use to fill in the matrix, each tile has a different number, from 1 up to however many you specified, image value is the number of the image you chop up, eg: load image "scenery.bmp",1 puts the .bmp called image into image value 1, set matrix texture just alters what happens at the edge of the matrix, you can ignore that one for now
, cheers.
Mentor.
PC1: P4 3ghz, 1gig mem, 3x160gig hd`s, Radeon 9800pro w cooler (3rd gfx card), 6 way speakers.
PC2: AMD 2ghz, 512mb ram, FX5200 ultra, 16 bit SB.
Mini ATX cases suck.