best way to do alpha blending

Post Reply
danny
Posts: 1
Joined: Sun Nov 06, 2011 5:59 pm

best way to do alpha blending

Post by danny » Sun Nov 06, 2011 9:26 pm

hi, I know this topic is probably a very common one, but I still couldn't find an answer that suits me.
I'd like to ask you, what is the best way to do something like in EBA game:
Image
You clearly see that at least 3 sprites here are alpha blended, each of them in different way.
I want to have a couple of sprites on the screen, but each of them of different transparency, there would also be some kind of background so it will not be a blank black one.
I've read about using some registers values but would I be able to alpha-blend more then one sprite in a different way simutanously?
I thought about getting colors pixel by pixel and changing them manually through some kind of formula but I couldn't find any function that would allow me to get single pixels out of the sprite and background...
What's the best way to do it in your opinion?
(sorry for bad english, still learning)

mtheall
Posts: 211
Joined: Thu Feb 03, 2011 10:47 pm

Re: best way to do alpha blending

Post by mtheall » Mon Nov 07, 2011 7:52 am

If you use bitmap sprites, then the palette selection bits (attribute 2, bits 12-15) of the OAM entry are instead used for alpha (0 = invisible to 15 = full alpha). However, in all honesty, I wouldn't be surprised if Elite Beat Agents uses 3D surfaces instead of sprites. But if you want to use the sprite engine and have varying transparencies on a per-sprite basis, bitmap sprites would be the way to go.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests