Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > Sprites 'leaking' through bitmap
2010-08-03 08:54
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

2010-08-03 09:19
MagerValp

Registered: Dec 2001
Posts: 1078
Sprites show in front of %00 and %01 pixels, and hide behind %10 and %11 pixels.
2010-08-03 09:29
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
2010-08-03 13:30
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
2010-08-03 14:27
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.
2010-08-03 16:26
WVL

Registered: Mar 2002
Posts: 902
bitwriting, I like that. The new word for coding!
2010-08-03 17:10
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.
2010-08-03 19:24
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.
2010-08-05 06:57
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)
2010-08-05 09:15
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.
2010-08-05 11:28
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?
 
... 1 post hidden. Click here to view all posts....
 
Previous - 1 | 2 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Mihai
The Phantom
rikib80
Freeze/Blazon
Guests online: 79
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 Edge of Disgrace  (9.6)
6 What Is The Matrix 2  (9.6)
7 The Demo Coder  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 No Listen  (9.6)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 Dawnfall V1.1  (9.5)
7 Rainbow Connection  (9.5)
8 Onscreen 5k  (9.5)
9 Morph  (9.5)
10 Libertongo  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Censor Design  (9.3)
5 Triad  (9.3)
Top Swappers
1 Derbyshire Ram  (10)
2 Jerry  (9.8)
3 Violator  (9.7)
4 Acidchild  (9.7)
5 Cash  (9.6)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.04 sec.