| |
SIDWAVE Account closed
Registered: Apr 2002 Posts: 2238 |
Sprites 'leaking' through bitmap
Hey, i have a leaking bitmap! :D
I have a koala pic, with sprites behind it, and they are supposed to only show where the bitmap background color (d021) is used.
They do, but the strange thing is that they 'leak' through in a few places.. through the bitmap.
why this ?
is the VIC chip fried ?
i have 3 sprites, and i have set $d01b to %00000111
|
|
... 1 post hidden. Click here to view all posts.... |
| |
WVL
Registered: Mar 2002 Posts: 902 |
Like Magervalp said, for multicolor modes %00 AND %01 are considered to be background. If you don't want your sprites to 'shine through', you can only use %10 or %11 colors in the bitmap.
If you need the %01 color also, your only option is to cut holes at the correct places in the sprite to prevent this. This is pretty doable, even for 3 sprites (just check Pinball Dreams previes f.e., where I do the same every frame for the ball which is made out of 3 hires sprites). I think for me it costs about 15 rasterlines to cut all 3 sprites, but then they are at the same position. It will probably be more like 35-40 rasterlines for 3 sprites with 3 independent positions.
You can use the fact that %01 is considered background to make nice transparancy-effects though! :D |
| |
SIDWAVE Account closed
Registered: Apr 2002 Posts: 2238 |
%10 and %11 to block the sprites out ?
so only can use color 2 and 3 ? eh ?
or how to understand your bitwriting :D |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Each multicolor pixel in the bitmap consist of two bits as you know. The VIC chip will only compare on the most significant bit per pixel to determine visibility. Hence colors 0 (%00) and 1 (%01) are considered background and colors 2 (%10) and 3 (%11) are considered foreground.
When you place a sprite below u're only placing in begin the foreground but above the background.
|
| |
WVL
Registered: Mar 2002 Posts: 902 |
bitwriting, I like that. The new word for coding! |
| |
enthusi
Registered: May 2004 Posts: 677 |
bitwriting, very nice...
You can use svn version of skoe's "multicolor" to strinctly select MC col 0-3 for pixeling.
Used ie. in Zak is back for clipping. |
| |
Partz Account closed
Registered: Jun 2008 Posts: 17 |
I think there is a good example of this happening on the old Tony Crowther game - Gryphon. Check out the sprite scroller on the title page and see how the priority keen altering... gets crazy on the eyes. |
| |
WVL
Registered: Mar 2002 Posts: 902 |
Anyway, what did you decide to do? :D
Now I'm thinking of it, I had the same problem in Arcanum, where the moon should go behind the building & clouds.. In the last few days I didnt have any time anymore to fix the clouds so the moon would really go behind them.. Aargh! (the little house itself is made from sprites) |
| |
SIDWAVE Account closed
Registered: Apr 2002 Posts: 2238 |
well i decide to make the sprites in such way, that i dont need to hide them..
the reason is, that i cannot have those colors there, as it simply looks wrong. |
| |
enthusi
Registered: May 2004 Posts: 677 |
@WVL
set up some sprites with higher priority infront of the moon?
They could still be behind the BG so a 1-color sprite might suffice? |
| |
WVL
Registered: Mar 2002 Posts: 902 |
@enthusi : I could have fixed it by just changing the bitcombos, but there was no time left... |
Previous - 1 | 2 - Next |