Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Bombadil on Mon 29/11/2004 23:41:45

Title: Change palette transparent color
Post by: Bombadil on Mon 29/11/2004 23:41:45

Does exist any way of changing the palette transparent color?

I work with an 256-colors palette and the transparent color it's on RGB 0,0,0 . When I wanna import new sprites, it's so annoying to have to import them surrounded by black because black is one of the colors I use most.

If anybody knows how to do it or has any ideas I would appreciate it.
Title: Re: Change palette transparent color
Post by: Ashen on Mon 29/11/2004 23:48:00
When you import sprites, you have the option of what to use as transparancy - by default, it's the top-left pixel of the image, but you can alter it (I think the options are top-left, top-right, bottom-left, bottom-right and palette slot 0). It shouldn't matter what colour you surround your sprites with, or what the image's tranparent colour is, AGS will take as transparent what you tell it to.

Or have I misunderstood the problem?
What paint program are you using - it should be possible to change the transparency colour in there, before you save the image.
Title: Re: Change palette transparent color
Post by: Bombadil on Mon 29/11/2004 23:53:18

The problem is not from the painting program I use. The problem is that whatever is the color of the pixel I choose for being transparent [top-left, top-right, bottom-left, bottom-right and palette slot 0] the program turns all of the pixels of that color into black and then I can't see where are the edges of my sprites.
Title: Re: Change palette transparent color
Post by: Ashen on Mon 29/11/2004 23:57:39
Is this just in Sprite Manger, or does it show up in game as well?
Title: Re: Change palette transparent color
Post by: Gilbert on Tue 30/11/2004 01:20:06
If you use exact palette import for sprite it won't happen, however, to use this feature you must organize the colour slots carefully when you draw your sprites.
Title: Re: Change palette transparent color
Post by: Bombadil on Wed 01/12/2004 11:39:00
Here you have what the pic looks like in Paint and in AGS:

(http://espacioforos.miarroba.com/379546/Pal.JPG)
(http://espacioforos.miarroba.com/379546/Pal%202.jpg)

[colors don't match because the pallete in AGS is not complete].
[as you might should have noticed, are MI inventory items]

Wherever in AGS appears the image, it appears surrounded by black and its very annoying ^^. In the game, it appears ok.

Title: Re: Change palette transparent color
Post by: Ashen on Wed 01/12/2004 12:20:20
Odd, the background in the 'Import Sprite' dialog appears pink for me.
Anyway, it's not quite the answer you were after, but:
Try organising your sprites a little better, within the image. As it is, some of them are really tightly bunched up, and some are quite far apart, which might cause trouble with selecting them, anyway. Then, add a border around them, to make finding their edges easier, like this:
(http://www.geocities.com/whoismonkey/AGS/spritesheet.png)
(Remember, the top-left corner should be the transparent colour.)
Title: Re: Change palette transparent color
Post by: Bombadil on Wed 01/12/2004 13:09:21
Quote from: Ashen on Wed 01/12/2004 12:20:20
Then, add a border around them, to make finding their edges easier, like this:
Feeew, you worked hard!
I usually do that. The pic was just a file I used to store the inventory items I ripped from MI.

In 16-bit palette it appears to me in pink too, but in 256 colors appears black.
Title: Re: Change palette transparent color
Post by: Proskrito on Wed 01/12/2004 13:41:48
i dont think you can change this behaviour, thats how it is.
If the problem is that when importing multiple sprites, you cant see the edges well, you can organize the sprites as ashen did (and you said you do), or import them one by one. That way you wont need to see the edges.
Title: Re: Change palette transparent color
Post by: Bombadil on Wed 01/12/2004 13:45:32

Ooow, well. Thanks Proskrito for the info! I'll have to manage to survive with black surroundig me. lol

Offtopic: BTW, can you PM me with the differences between templates? ;) Thx