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

 
... 1 post hidden. Click here to view all posts....
 
2010-08-03 09:29
WVL

Registered: Mar 2002
Posts: 886
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: 1990
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: 886
bitwriting, I like that. The new word for coding!
2010-08-03 17:10
enthusi

Registered: May 2004
Posts: 675
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: 886
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: 675
@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?
2010-08-05 14:00
WVL

Registered: Mar 2002
Posts: 886
@enthusi : I could have fixed it by just changing the bitcombos, but there was no time left...
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
fegolhuzz
Visage/Lethargy
crayon/Hokuto Force
t0m3000/HF^BOOM!^IBX
Grue/Extend
mayor/Taongad/Wide L..
pcollins/Quantum
Jammer
Andy/AEG
Guests online: 115
Top Demos
1 Next Level  (9.8)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.7)
5 Edge of Disgrace  (9.6)
6 Comaland 100%  (9.6)
7 Uncensored  (9.6)
8 No Bounds  (9.6)
9 Wonderland XIV  (9.6)
10 Bromance  (9.5)
Top onefile Demos
1 Layers  (9.7)
2 It's More Fun to Com..  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 TRSAC, Gabber & Pebe..  (9.5)
7 Rainbow Connection  (9.5)
8 Dawnfall V1.1  (9.5)
9 Quadrants  (9.5)
10 Daah, Those Acid Pil..  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Booze Design  (9.3)
3 Censor Design  (9.3)
4 Crest  (9.3)
5 Performers  (9.3)
Top Coders
1 Axis  (9.8)
2 Graham  (9.8)
3 Lft  (9.8)
4 Crossbow  (9.8)
5 HCL  (9.8)

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