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.

Author
Message
Great Knight
23
Years of Service
User Offline
Joined: 25th Feb 2003
Location:
Posted: 12th Oct 2003 00:23
Ok this is one thing i never figure out to do. How do I make a different tile on the matrix a different texture from a picture i made. Because i am trying to make a dirt road on the matrix but either it fills the entire matrix or i can not get it to work.

AMD Atherlon 2400+ XP, 380 DDr memeory, ATI Radeon 9000 64 DDR, Windos XP home edition.
-----------------------And a Katana.
ReD_eYe
23
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 12th Oct 2003 11:29
Step by Step Guide to Texturing a Matrix
first you must have an image, on this image there must be 2+ textures,such as this one



in your program you must first make your matrix and load the image with your textures on it

then the important bit



the first 2 numbers specify which matrix and which image your going to use, the next two specify how you want the image to be split up, so 2 along the x axis and 2 along the y axis in this case. As 2*2 is 4 we now have 4 texture tiles we can use on our matrix.
(prepare matrix texture also textures the entire matrix with the top left texture in the image)

now we use the set matrix tile command


that line textured the middle matrix tile(10,10) on matrix number one with tile texture number 4 whcih is the bottom right on that image. this command can be used in for-next loops totextures larger areas, aswell.

after doing anything to our matrix we must update it


so stick that at the end of your matrix set up code.

Heres an example program that shows you a textured matrix using the image above.



just save the image above and save the code into the same directory and compile and run.

Also check out my 20 line competition entry, that allows you to make+texture a matrix very easily.

http://darkbasicpro.thegamecreators.com/?m=forum_view&t=14006&b=11

hope that helps, any problems/questions just ask


Great Knight
23
Years of Service
User Offline
Joined: 25th Feb 2003
Location:
Posted: 13th Oct 2003 03:11
hey thxs that does help a lot, but i got antoehr quesion how does it work when it splits the tiles do i need it a certain size or does it reconize the tiles all ready when i split it up.

AMD Atherlon 2400+ XP, 380 DDr memeory, ATI Radeon 9000 64 DDR, Windos XP home edition.
-----------------------And a Katana.

Login to post a reply

Server time is: 2026-07-26 19:18:46
Your offset time is: 2026-07-26 19:18:46