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.

DarkBASIC Discussion / matrix tiles

Author
Message
koolaid
21
Years of Service
User Offline
Joined: 26th Jan 2003
Location: Cyberspace
Posted: 5th Feb 2003 07:49
i dont want my matrix to be all one texture i want different textures on them how can i do this.
freak
21
Years of Service
User Offline
Joined: 20th Jan 2003
Location:
Posted: 5th Feb 2003 16:40
you can texture each matrix tile with a different texture
it shouldn't be too difficult to search that in the index (just search for 'tile' and you will find the command I think)

koolaid
21
Years of Service
User Offline
Joined: 26th Jan 2003
Location: Cyberspace
Posted: 6th Feb 2003 08:25
i have a matrix created and a loaded image as a texture and prepared it i want to load another image as a texture and use it on a different tile on the matrix create a walkway to somewhere whats the code to do that,i would really appreciate it

freak
21
Years of Service
User Offline
Joined: 20th Jan 2003
Location:
Posted: 6th Feb 2003 08:35
you'll need these two commands (after u used a load image command)

PREPARE MATRIX TEXTURE
This command will select an image of tiled textures that the matrix will eventually use. Each grid square in the matrix can have a tile texture, located within the image. Individual tile textures can be obtained from the single image by slicing it into sections both across and down. The tile textures are then assigned a number starting in the top left corner of the sectioned image and working across, then down. To section an image into 4 smaller tile textures you would specify 2 across and 2 down.

Textures need to be of a particular size. The maximum image size you can use as a texture is 256x256. All images are ideally square and are divisible by 2. So texture sizes of 2x2, 4x4, 8x8, 16x16, 32x32, 64x64 and 128x128 are the standard dimensions to use. The parameters should be integer values.

SYNTAX
PREPARE MATRIX TEXTURE Matrix Number, Image Value, Across, Down





SET MATRIX TILE
This command will texture an individual grid square with an image specified by the tile number. Only if the matrix has been prepared with a texture will this command work. The tile number equates to a portion of graphic within the sectioned image you used to prepare the matrix texture. If you had prepared a matrix texture with four segmented images, you would reference these images as tile numbers from 1 to 4. The parameters should be integer values.

SYNTAX
SET MATRIX TILE Matrix Number, X, Z, Tile Number


Login to post a reply

Server time is: 2024-05-24 13:38:38
Your offset time is: 2024-05-24 13:38:38