Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I am starting to try and figure out polygon collision detection in my Android game. I am currently doing pixel level collision detection and it just seems to be too slow (though it works). I was looking at this tool and it seems like it would be really handy to give me a set of vertices for my images. Does anyone have any ideas about how I should go about implementing this? Basically once I have a list of vertices that form a polygon, how can I detect if polygon A intersects polygon B? I can see that these vertices can be used easily with Box2D but I want to try to do this without Box2D first.

share|improve this question
    
Box2D is open source and has been ported to Java. Why not see how they do it? –  ClassicThunder Feb 23 '12 at 17:56
    
@ClassicThunder: True haha, I am looking at the source right now. As I expected it seems complicated, but I will continue to see if I can get something out of it. Thanks, I hadn't thought about that. Maybe I should just give in and use Box2D haha. –  DiscGolfer Feb 23 '12 at 18:00

1 Answer 1

up vote 2 down vote accepted

Separation Axis Theorem

share|improve this answer
    
This a really great resource, thanks for posting that. –  DiscGolfer Feb 23 '12 at 18:33
    
Separating Axis Theorem and GJK are both popular choices for convex polygon collisions. –  Kai Feb 23 '12 at 20:00
    
This is the way I am going to go, I think I can definitely get it to work using one of these algorithms. Thanks a lot! –  DiscGolfer Feb 24 '12 at 17:34

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.