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 textures

Author
Message
Cookyzue
20
Years of Service
User Offline
Joined: 12th Oct 2003
Location: Who Cares?!
Posted: 26th Apr 2004 04:34
is it possible to texture a matrix with a different image in one area. Like sand on a beach or snow on a mountain?


GameKit
21
Years of Service
User Offline
Joined: 6th Mar 2003
Location: USA, Staring Blankly at a Computer
Posted: 26th Apr 2004 17:53
Yes... First, make a texture in paint and divide it into sections, having a different texture in each of the sections... For exapmle, if you want to be able to use 9 different textures, your image would look something like this...



Load the image into your program. Then, In your code after you've made the matrix, Add a line that says...
Prepare Matrix Texture 1,[Image Number],3,3
The two 3's are for the number of X and Y sections in your image...
After that, to apply the image of your choice to the matrix, you would say...
Set Matrix Tile 1,[Tile X],[Tile Y],[Texture Number]
...A texture Number of 3 would apply the Water Texture... 4 would apply the sand texture...

Well... I hope that helped...

Thou shalt not thwart the way of the dragon. For thou tasteth like chicken.
Cookyzue
20
Years of Service
User Offline
Joined: 12th Oct 2003
Location: Who Cares?!
Posted: 27th Apr 2004 08:03
thanks game creator!


Login to post a reply

Server time is: 2024-09-22 06:38:16
Your offset time is: 2024-09-22 06:38:16