Mail Archives: djgpp/1997/07/21/09:06:25
BDC Client Team <cs19 AT cityscape DOT co DOT uk> wrote in article
<869142033 DOT 25228 DOT 0 DOT nnrp-5 DOT 9e9829a4 AT news DOT demon DOT co DOT uk>...
> Hi all,
>
> I have been working on a routine for a pixel-perfect collision detection
> for Allegro sprites. The basic idea is that you create a bit-mask
> for each Allegro sprite, do general bounding-box detection until
> this flags a collision and then use the bit-masks to see if a *true*
> collision has occured (i.e. actual pixels overlap).
>
> I'm fairly sure that I am creating the bit-masks correctly, but when I
come
> to (logically) 'and' two bit-masks together I get false returns all the
time.
> I have gone through my code time and again, and just can't spot where I
> am going wrong.
I suggest that you take a look at this article.
http://www.ddj.com/ddsbk/1995/1995.05/roberts.htm
I found it very helpful.
> Would anyone out there be prepare to look at the code (it's only 300
lines long)
> and point me in the right direction?
Send it to me and I'll have a look. Can't promise anything though.
Chris Wise
- Raw text -