gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Beginners > Transparency on 16 colour sprite

#5559 - Wildginger - Thu May 01, 2003 9:39 pm

Hi,

I recently changed my 256 colour sprites to 16 colour sprites so I could fit more on the screen.

I used another tool to convert the gif (gif2sprites as was suggested), and everything went fine, apart from black is no longer transparent.

How do I set black to be transparent?

Thanks
_________________
---
Wildginger (aka JimTownsend)

#5561 - niltsair - Thu May 01, 2003 9:41 pm

It has to have the color 0. How you choose that depends on the tool.

#5562 - Wildginger - Thu May 01, 2003 9:46 pm

wow, quick response.

Sorry to sound a bit slow on this, but I dont quite follow. (complete beginner)

My sprite was originally made in MSPaint, and saved as 256 colour bmp. Transparency was fine, but didnt allow me enough sprites. All I did then was save it as a 16 colour bitmap, then re saved that as a gif, and put it through gifs2sprite.exe.

Where and what do I set 0? Is it in the code, MSPaint, or elsewhere?
_________________
---
Wildginger (aka JimTownsend)

#5563 - Wildginger - Thu May 01, 2003 9:53 pm

Sorry, Im a bit slow tonight. I get you now,

My black values were 0x1111 and they should have been 0x0000. You made perfect sense the first time.

Cheers.
_________________
---
Wildginger (aka JimTownsend)

#5589 - djei-dot - Fri May 02, 2003 2:12 pm

Hi, i'm a beginner myself, and though I already knew that the first color in the palette is the transparency color, I'd like to know how you people usually set this.
Changing palette and sprite values on C or ASM code is easy but seems to take a lot of doing just to set a transparency value.
Is there a simpler way to do this, in MSPaint for example? (or do you need a more sophisticated graphics program, like PSP?)

#5591 - niltsair - Fri May 02, 2003 2:19 pm

I think some picture converter allow you to pick which color in the palette will be transparent, and when you convert it, it move it to palette entry 0.

The other way is to modify our palette in a picture program. Making sure that your background color is indeed the color 0 of your palette.