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 / image colorkey???

Author
Message
NoOnE
21
Years of Service
User Offline
Joined: 8th Feb 2004
Location: Erm
Posted: 11th Feb 2004 02:23 Edited at: 11th Feb 2004 02:35
Can anyone tell help, I'm creating a 2d game and have created sprites with the back colour as purple and I'm now trying to make this colour transparant. I was told the syntax was:
SET IMAGE COLORKEY ImageNumber,rgb(255,0,255)
but dark basic throws an error saying it is a syntax error, unrecognised parameter. Any ideas?

time is money, but pleasure is priceless!
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 11th Feb 2004 04:04
Whoever gave you that info was mistaken, as that command is only available in DarkBASIC Professional I'm afraid.

The only colour that you can make transparent is black, RGB(0,0,0).

If you have made the background purple becuse you are using black in your image, just change those areas to slighty more than black, ie, RGB(10,10,10) And you'll never notice the difference.

Hope I Helped...
Jess.


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 11th Feb 2004 04:08
actually to be more precise rgb 0,0,0 to rgb 15,15,15 will be transparent in classic


Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 11th Feb 2004 04:15
Ah, That's handy to know, Thanks Indi

Jess.

PS at least you didn't try and reply with a DBP solution again, lol.


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 11th Feb 2004 06:55
at least i didnt remark at a silly comment perhaps.


Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 11th Feb 2004 07:04
Erm... ok.

I feel as though I offended you. For that, I am sorry.

Jess.


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 11th Feb 2004 08:57
dont sweat it, was a meer aussie jab


Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 11th Feb 2004 09:11
Australian ay?

I know your kind... Hell, I am one of your kind... lol. Go Aussies

So... NoOnE, have we answered your question?

Jess.


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
NoOnE
21
Years of Service
User Offline
Joined: 8th Feb 2004
Location: Erm
Posted: 11th Feb 2004 13:35 Edited at: 11th Feb 2004 16:34
Thanks JessTicular, it's solved the problem but it doesn't help, because I've now got 600 images to recolour.

time is money, but pleasure is priceless!
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 11th Feb 2004 13:57
if one pixel in each tile is the same : eg: the alpha colour, you could write a photoshop script to do them all in one batch.


NoOnE
21
Years of Service
User Offline
Joined: 8th Feb 2004
Location: Erm
Posted: 11th Feb 2004 14:47 Edited at: 11th Feb 2004 14:53
indi
that sounds like an excellent idea, but
a) i don't know how to write a script in photoshop
b) i have black in the images, so this colour would need changing as well.
I think it would be better if i recreated the images using 3dmax as I've still got the models I used. Thanks anyway.

time is money, but pleasure is priceless!
TIGER
22
Years of Service
User Offline
Joined: 31st Aug 2002
Location: Argentina
Posted: 11th Feb 2004 16:58
Or you can write a simple proggy in DB to do that also.
NoOnE
21
Years of Service
User Offline
Joined: 8th Feb 2004
Location: Erm
Posted: 11th Feb 2004 16:58 Edited at: 11th Feb 2004 16:58
indi
Quote: "actually to be more precise rgb 0,0,0 to rgb 15,15,15 will be transparent in classic."

I have been informed that RGB(8,8,8) is not transparent in classic, just though you would like to know.

time is money, but pleasure is priceless!
NoOnE
21
Years of Service
User Offline
Joined: 8th Feb 2004
Location: Erm
Posted: 11th Feb 2004 17:00
tiger
how simple?

time is money, but pleasure is priceless!
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 12th Feb 2004 03:30
well after testing it with dbc 113 its back to rgb(0,0,0)
seems like they have changed it.
Id hate to base evaluations of being informed and test it myself.
thats where mistakes come from.




Login to post a reply

Server time is: 2025-05-22 19:11:05
Your offset time is: 2025-05-22 19:11:05