Black colour and sprite transparency

Started by WHAM, Tue 05/08/2008 21:09:34

Previous topic - Next topic

Cassiebsg

I was just thinking about that, but don't know how the engine works when importing the images. I just assumed that if her PNGs have transparency, then AGS would be able to use that and convert that into transparent color.

The real question is, why not use 32-bit instead?  ;)
There are those who believe that life here began out there...

tilapisha



This is what I'm importing, which is a png image with a transparent background.

This is what happens when I import:

[imgzoom]https://github.com/lishap/gobyworld/blob/main/Screenshots/Screenshot%202022-04-20%20163556.png?raw=true[/imgzoom]

tilapisha

Quote from: Cassiebsg on Wed 20/04/2022 17:06:30
The real question is, why not use 32-bit instead?  ;)

I guess I could. I'm hoping to port this to the web, and so the smaller the file sizes the better. Also, would that fix my problem? Originally I was having no issues with importing and the black colors.

Crimson Wizard

#23
In the above example you are importing a 32-bit sprite into 16-bit game, so it has to be converted to 16-bit, but you also choose "Leave as is", so the question is what would become to the transparency layer in this situation. I'd need to make a test myself to find out.
EDIT: I think it simply strips the alpha channel, so these transparent parts become solid color. For example, if you used color ARGB (0,0,0,0) in the paint program, then this becomes simply black.

For 16-bit games you should not be using transparency layers, but rather have a simple background of some color, which you would set as a transparent during import using "Top left"/"bottom left"/etc pixels.

SMF spam blocked by CleanTalk