delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/07/21/09:06:25

From: "Chris Wise" <wise AT eng2 DOT eng DOT monash DOT edu DOT au>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Help with bit-masking Allegro sprites
Date: 18 Jul 1997 08:26:47 GMT
Organization: Materials Engineering, Monash
Lines: 27
Message-ID: <01bc9354$55010f40$cf86c282@mat-wise.eng.monash.edu.au>
References: <869142033 DOT 25228 DOT 0 DOT nnrp-5 DOT 9e9829a4 AT news DOT demon DOT co DOT uk>
NNTP-Posting-Host: mat-wise.eng.monash.edu.au
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019