Discussion about software development for the old-school Gameboys, ranging from the "Gray brick" to Gameboy Color
(Launched in 2008)
You are not logged in.
Hello,
I have a problem when I create sprites. The white pixels around the sprite are supposed to be transparent so the sprite doesn't look like a 8x8 (or whatever dimensions) solid block. However, the white pixels inside the sprite, I want them to remain white.
Example:
The white pixels around the sprite should be transparent, but the white pixels in the eyes should remain white no matter what's behind. How can I do that?
Offline
Hi,
sprites have 4 colors whereby one is transparent. The default setting is:
Color 0 = white (transparent)
Color 1 = grey
Color 2 = dark grey
Color 3 = black
Color 0 is always the transparent color. The best way for your sprite is to replace the grey parts with dark grey and change the object palette using the OBP0 register in order to get a non transperent white.
Color 0 = white (transparent)
Color 1 = white
Color 2 = dark grey
Color 3 = black
Last edited by 0x7f (2021-08-26 11:27:03)
Offline
Also sprites may have either obp0 or obp1 palette. If you put two sprites with different palettes one over the other, you can get a 4-colored sprite. Many games use that trick.
Offline
Thanks toxa and 0x7f. I'll do the double sprite trick, then.
Offline