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 Professional Discussion / Prepare matrix texture

Author
Message
Maverick
23
Years of Service
User Offline
Joined: 9th Oct 2002
Location:
Posted: 1st May 2003 18:29
I loaded an image that is 256x256 and wanted it sectioned into 32
(8 rows x 8 columns) pixel textures and used the prepare matrix texture command and it doesnt matter how many columns and rows I tell it to use it comes out showing the whole image as 1 tile, even if i tell it to cut the image into 100 rows and columns tile #123 is the whole image, #124 is the whole image and so on. If anyone can suggest a fix or something I may be doing wrong it would be grealy appreciated. Thanks
Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 1st May 2003 18:58
Can you post your source code please?

Current Project: TANK MELÉE [Artwork] , DBPro Windows GUI Plugin [Slow but steady ]

Joke of the Month: "Why drink and drive when you can smoke a spliff and fly?"
Maverick
23
Years of Service
User Offline
Joined: 9th Oct 2002
Location:
Posted: 1st May 2003 19:21
Ok here is is
The image is 256x256 split into 32x32 pixel tiles

Maverick
23
Years of Service
User Offline
Joined: 9th Oct 2002
Location:
Posted: 1st May 2003 19:22
oops dammit



Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 1st May 2003 21:10
"and wanted it sectioned into 32
(8 rows x 8 columns)"

8x8=64

Current Project: TANK MELÉE [Artwork] , DBPro Windows GUI Plugin [Slow but steady ]

Joke of the Month: "Why drink and drive when you can smoke a spliff and fly?"
Flashing Blade
23
Years of Service
User Offline
Joined: 19th Oct 2002
Location: United Kingdom
Posted: 1st May 2003 21:26
do you wan the 1 image o cover entire matrix?

if yes try this:
Flashing Blade
23
Years of Service
User Offline
Joined: 19th Oct 2002
Location: United Kingdom
Posted: 1st May 2003 21:27
my 't' has a paper clip stuck under it
Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 1st May 2003 21:31
Yes, I get a similar problem to you, except here the first tile fills all the squares. This is weird, I have never had this problem before, I must be missing something simple. PREPARE MATRIX TEXTURE isn't supposed to fill it, but it is.

Current Project: TANK MELÉE [Artwork] , DBPro Windows GUI Plugin [Slow but steady ]

Joke of the Month: "Why drink and drive when you can smoke a spliff and fly?"
Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 1st May 2003 21:37
That's interesting, set the image to be divided into the same no. of tiles as the matrix and you get different results.

Current Project: TANK MELÉE [Artwork] , DBPro Windows GUI Plugin [Slow but steady ]

Joke of the Month: "Why drink and drive when you can smoke a spliff and fly?"
Stevo
23
Years of Service
User Offline
Joined: 4th Oct 2002
Location:
Posted: 3rd May 2003 04:07
Maverick, you have put your t in just the position of the matrix x coordinate!



tilesx=32
tilesy=32

make matrix 1,1024,1024,tilesy,tilesx
prepare matrix texture 1,1,8,8

for x = 1 to tilesx
for y = 1 to tilesy

rem t is the actual tile image

inc t
set matrix tile 1,x,y,t

next x
next y

update matrix 1

hopefully that should do it? I think, other wise ask again

Login to post a reply

Server time is: 2026-07-11 12:00:31
Your offset time is: 2026-07-11 12:00:31