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 / Matrix Texture

Author
Message
MTGNecro
21
Years of Service
User Offline
Joined: 13th May 2003
Location:
Posted: 16th May 2003 23:32
can someone please explain the Set matrix tile and the image tiles, just please explain to me everything in the parenthesis on the code snippet :-s :-s
Scorpyo
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 17th May 2003 00:14
Well basically it is like this:

Make matrix 1,10000,10000,20,20

the make matrix command will make your matrix tiled from 0 till 19(=20 tiles) in the 2 directions of the matrix grid.

Load image "grass09.bmp",1
Prepare matrix texture 1,1,2,2 (matrix,image,horizontal tiles,v.tiles)
this will load image 1, and tile it 2x2=4 tiles for matrix 1 like this:
12
34

the rest of your code selects randomly 1 of the image tiles (1 to 4) and puts it in one of the matrix tiles (0-19,0-19)
each matrix tile is defined by 2 numbers, from 0,0 to 19,19 in this case, like this:
0,0 ; 1,0 ; 2,0 ....19,0
0,1 ; 1,1 ; 2,1 ....19,1
.
.
.
0,19 ; 1,19 ; 2,19 ....19,19
MTGNecro
21
Years of Service
User Offline
Joined: 13th May 2003
Location:
Posted: 17th May 2003 01:35
Can u explain the 0-19 part in depth because that is the part that that is really bugging me, i mean it makes an image tile of what and it places it where? :-s

Login to post a reply

Server time is: 2024-11-24 14:32:35
Your offset time is: 2024-11-24 14:32:35