Mikuro
Crotchety UI Nitpicker
I'm trying to create a simple 2D sprite engine (more as an exercise than anything else, really), and I need some way to do collision detection. How should I go about determining if one irregularly-shaped image overlaps another? I think this is easy to do using QuickDraw regions, but I'm trying to keep it all Cocoa. Quartz doesn't seem to have any similar functions. Seems like Quartz has a bit of a "screw bitmapped graphics" philosophy.
I guess I could check each individual pixel's alpha level and compare it to the corresponding pixel in the other image, but I imagine it would be way too slow. Am I wrong?
While I'm on the subject...should I be using Quartz at all for such a thing? Would I be better off basing the whole thing on QuickDraw? I know I could also use OpenGL, but...I don't wanna (yet). OpenGL scares me.
I guess I could check each individual pixel's alpha level and compare it to the corresponding pixel in the other image, but I imagine it would be way too slow. Am I wrong?
While I'm on the subject...should I be using Quartz at all for such a thing? Would I be better off basing the whole thing on QuickDraw? I know I could also use OpenGL, but...I don't wanna (yet). OpenGL scares me.