PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Pixel based collision detection

Hello everyone,

I'm playing around with PocketFrog and I'm wondering if anyone has some really fast code for pixel based collision detection to share? I was considering using the PixelShader to detect pixel collisions but I'm guessing that it will be slow since it incurs a function call per pixel? The traditional method is of course to create a mask which is AND'ed with the background and checked for remaining pixels.

Thanks for any input.

Roger Dahl
I think most of us check for bounding-box collision first, and then pixels. It's probably the most efficient way to do it.