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 / get color data

Author
Message
Zotoaster
21
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 5th May 2005 00:47
ok, say you had a matrix thats 25x25 tiles, and you make an image thats 25x25px, and you colored in the image with a bunch of colors, how would you get the image, get data from it, and say pixel 8x4 is red, you texture tile 8x3 with a certain texture, and if another part of the image is green, you texture that part of the matrix with a certain texture?
thanks in advance

"Well, if he dies, it'll teach him not to do it again." - Me
Sven B
21
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 5th May 2005 00:53
I coded a snippet to adjust the matrix height with images

http://forum.thegamecreators.com/?m=forum_view&t=51813&b=6
Zotoaster
21
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 5th May 2005 01:58
nah, i can do that, its changing the textures, i tried using the same teqnique as the heightmap things but it doesnt work

"Well, if he dies, it'll teach him not to do it again." - Me
Link102
21
Years of Service
User Offline
Joined: 1st Dec 2004
Location: On your head, weeeeee!
Posted: 5th May 2005 07:04 Edited at: 5th May 2005 07:04
here you go, one height mapping code. Needs to be tweaked tho, but it works


please reply
Zotoaster
21
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 5th May 2005 08:08
lol , i said i CAN do the heightmapping thing its the 'texture map' (my own little name for it ) that i need help with..any ideas?

"Well, if he dies, it'll teach him not to do it again." - Me
Link102
21
Years of Service
User Offline
Joined: 1st Dec 2004
Location: On your head, weeeeee!
Posted: 5th May 2005 21:44 Edited at: 5th May 2005 21:45
wel first you need to know the full collor codes of green, red, blue, yellow etc (collors that only use rgb values of 255 and 0). the you can create the texturemap thingey same way you did the height map.

please reply
Zotoaster
21
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 5th May 2005 22:42
ok, i'll give it a shot

"Well, if he dies, it'll teach him not to do it again." - Me

Login to post a reply

Server time is: 2026-07-10 02:31:41
Your offset time is: 2026-07-10 02:31:41