Can anyone give me a reference to sites, blogs, articles, or post themselves a crash course or easy help guide in 2-D collision detection for Android? I looked at collision code from an online tutorial but they didn’t explain the collision part of the code – just the part of implementing sprites. I am not using OpenGL, I am using Canvas for my game. I have searched around but I keep finding stuff for OpenGL or C++ but I am using Java. Code examples that are explained would be highly appreciated. Thanks for any help you can offer.
Share
colliding rectangles is easiest (actually circles are but with sprites your not using those)
for 2 rectangles to collide/overlap some space needs to be shared
for getting which ones collide you can sweep over the entire board and check all the overlap in one dimension