Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / help me please

Author
Message
Gordon 1000
20
Years of Service
User Offline
Joined: 30th May 2004
Location:
Posted: 29th Sep 2004 05:41
ok um a tile is a image right so how do I use it in fill matrix , set matrix tile also prepare matrix texture what's a image value mean and what am I supposed to write in there. and also one more thing which I hope you can help with is the set matrix texture how do i use all these commands correctly.

gulp
Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 29th Sep 2004 06:14
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.

Login to post a reply

Server time is: 2024-09-23 01:17:43
Your offset time is: 2024-09-23 01:17:43