Archived

This topic is now archived and is closed to further replies.

Polygon-based collision over pregenerated backgrounds

This topic is 5778 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites