Jump to content
  • Advertisement

Archived

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

acardion

Collision detection with large background objects

This topic is 5277 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

Hi, I am a newbie in game programming.I know how to do collision detecion with fixed-sized(32x32...etc) tiles and character sprites. But how about those large background objects with "irregular sizes" (such as those buildings in baldur''s gate)?This problem confuses me for a long time. Thanks! Acardion.

Share this post


Link to post
Share on other sites
Advertisement
The terrain in Baldur''s Gate and any other Infinity Engine game uses several layers of images to not only generate what you see, but determine visibility and collision. It''s just a pixel-map with values representing what is navigable and what is not. Characters in those games use circular (or eliptical?) collision hulls. Calculating collision between characters and terrain is therefore merely a matter of checking to see whether an impassible pixel will be within the collision hull or not.

Share this post


Link to post
Share on other sites
yeah, 3D math, 3D math, 3D math. aka linear algebra. you set up bounds around objects and check to see if those 3-dimensional objects are intersecting, if they are you then look to see if the actual polygons of the 2 objects are intersecting. if they are then you mark a collision and handle it appropriately.

if you''re really interested, check out some of the articles in the "Articles & Resources" section. I believe that there are many articles there on 3-D collision detection. you''ll need to know a bit of Linear Algebra to understand them, but you can probably pick up enough of the concepts to satisfy your curiosity.

This article is pretty meaty for an introduction but it has some pretty good concept stuff and some good illustrations:
http://www.gamasutra.com/features/20000330/bobic_01.htm

-me

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!