| |
Executioner Account closed
Registered: Feb 2007 Posts: 3 |
Sprite Background/Foreground Priorities
Does anyone know what happens on a real C64 when you have a sprite with lower priority than the background behind a sprite with higher priority than the background but lower than the first sprite? Which is visible? the pixel from the background, top sprite (behind the background, but in front of the other sprite), or the lower priority sprite in front of the background? |
|
| |
SIDWAVE Account closed
Registered: Apr 2002 Posts: 2238 |
I dont understand the question..
The highest sprite will be visible.. |
| |
WVL
Registered: Mar 2002 Posts: 902 |
vic decides priority between the sprites first, and when that is decided the vic decides between sprite and background. You can make nice 'see-through' things with this, like interference circles.
example :
sprite 0 behind background
sprite 1 before background
-> sprite 0 wins over sprite 1, but sprite 0 loses from background. So background shows, despite of sprite 1 being 'inbetween'
How you can make 'see-through' from this :
object 1 is made from sprite 1 and background. You see sprite 1, because it's infront of background.
object 2 is made from sprite 0, you see sprite 2 (duh).
Now when object 1 and 2 overlap, you suddenly see the background (which you couldnt see before). Simply making the background a different color gives you 'see-through' or color-mixings..
rullar.
|
| |
Executioner Account closed
Registered: Feb 2007 Posts: 3 |
Quote: I dont understand the question..
The highest sprite will be visible..
sorry for my confusing question, I'll try and rephrase it:
Sprite 0 is the highest priority, will display in front of Sprite 1. ok, I get this :)
Sprite 0 is set to be lower priority than the background, but Sprite 1 is higher priority than the background.
Pixels from both sprites overlap a foreground pixel in the background. Sprite 0's pixel is a higher priority than Sprite 1, which is higher priority than the background, but Sprite 0 is lower priority than the background... What happens? |
| |
Executioner Account closed
Registered: Feb 2007 Posts: 3 |
Thanks WVL, that's exactly what I wanted to know :) |