Advertisement Jump to content


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

Eber Kain

Planning ahead, collision detection

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

Ive been finilazing my model format for a game i slowly developing, and I realized i had no way to do collision detection. If I export a box that is like a wrapper around the model, will it be easy to use this do collision detection? It will need to be fast, because the number of models will possably be very large.

Share this post

Link to post
Share on other sites
yeah thats one way. It depends how acurate the collision detection needs to be. And how much your willing to give up for the acuracy.

One implementation I''ve heard of is
1) bounding sphere for detecting collision (which is fast and easy)
2) if there is, then test the bounding rectangles around each limb of the player

or the otherway aound.

I am in the same boat. I am looking for the right collision detection method to use. Theres tons of examples out there. I just haven''t decided on which one is best for my engine.

Share this post

Link to post
Share on other sites
For me Bounding Sphere wouldnt be right, many of my models are not centered as to make it work right, and it just wouldnt end up working right.

I think useing a wrapping box will be good, since i dont really want super graphics, i think ill have the clock cycles to spare.

I was just makeing sure that i could do collision detection with a box. I realize it wouldnt be perfect, just so as it was close. This is an RTS game. And i cant do anything to complex, because the players will be able to make there own models for the game.

Share this post

Link to post
Share on other sites
The first thing is to bound them with a sphere. Even if it''s only approximate, you''ll still want to do this test before you bother with more complex checks (like a box).

I''ve seen also a technique that utilizes multiple "levels" of spheres that each bound smaller and smaller sections of your model.

I''m writing a game right now that is essentially 2D as far as collisions go. A simple circle is sufficing for the moment, but I aim to do true collision detection (line segment by line segment). In 2D this shouldn''t be too hard.

There are also libraries available, if your so inclined. I can''t remember the names, but they''re catchy (apparently not too catchy) acronyms. I''m sure somebody knows them.

Share this post

Link to post
Share on other sites
Bounding spheres are good enough and are extremely simple to implement and test for collisions.

If you wish abit more complex testing, you can choose the ellipsoid version instead. Its not much more complicated and suits most model cases.

Spheres are excellent both for rendering optimizations, collisions and lighting algorithms.

You cant pass this one up.

Check Bounding spheres tutorial
if you havent already.

Good Luck.

The Game Industry

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!