Polygon-based collision over pregenerated backgrounds

Started by
1 comment, last by AronBrown 22 years, 1 month ago
I am working on an adventure game similar to monkey Island and am having trouble with collision detection. I know I have to somehow store collision data as polygons, but I am not quite sure how. And when testing player collision would test a bounding rectangle with the polygon or just a certain point?
Advertisement
When testing polygon collision, you have to test every line in one polygon vs every line or point in another. This can be quite slow so people generally use axis aligned bounding boxes or circles for quick checks.

These can easily be stored as just a pair of numbers for the length of sides in the ase of a bounding box, or the radius for a bounding circle, assuming you already store the position of the object.


Here''s your answer!


And btw, drop by the adventure developer forums!


Cheers!


Llyod
The Indie 2D Adventure Devr''s and Gamers Forum!
Everything''s in it''s right place.

This topic is closed to new replies.

Advertisement