[SDL] Re: 2D collision testing

Mark Collins m.collins at codeplay.com
Wed Aug 8 03:01:02 PDT 2001


Quick and nasty:

XOR the sprites (without  background) then memcmp the images.

If there's a change, there's been a collision, otherwise, no.

Mark 'Nurgle' Collins
Developer Support - Codeplay Ltd.
http://www.codeplay.com
--
Mark 'Nurgle' Collins
Developer Support - Codeplay Ltd.
http://www.codeplay.com
"Jan Kratochvil" <honza at twin.jikos.cz> wrote in message
news:9kqptu$sck$1 at ftp.lokigames.com...
> Hi
>   i am making an 2D game and i need to implement collision testing. (not
> only box testing) Can u give me some advice? Just kick me in.  Thanks for
> help.
> Jan Kratochvil
>
>





More information about the SDL mailing list