Jump to content
  • Advertisement
Sign in to follow this  
Dean Johnson

Data structure to use for holding objecting in scene

This topic is 4617 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 trying to find the best data structure tree for holding my game objects. I have a level that is relatively flat with minor changes in the terrain height. All game objects have bounding spheres. There are static buildings and moving vehicles. What I am looking for is a way to test as few objects a possible for collisions. Right now all objects check themselves again all others. I have read up on a few different tree structures but I was wondering everyone’s opinion what would be the best in my case. About half of the object in the scene might move so they would need to be replaced in the scene tree. If you know any good sites or books I would greatly appreciate it. Thanks in advance

Share this post


Link to post
Share on other sites
Advertisement
In my teams engine, we use a simple "sphere" collision to see if we should even calculate a more complex collision test. So for people and objects we just check the distance between the objects, usually by origin, and then if it's close enough to touch we perform polygon detection. For objects like a weapon, say you wanted to pick it up, we just check to see if it's in the weapon's "sphere."

Share this post


Link to post
Share on other sites
I would say no more then 200 objects in the scene.

Quote:
Original post by dbzprogrammer
In my teams engine, we use a simple "sphere" collision to see if we should even calculate a more complex collision test. So for people and objects we just check the distance between the objects, usually by origin, and then if it's close enough to touch we perform polygon detection. For objects like a weapon, say you wanted to pick it up, we just check to see if it's in the weapon's "sphere."


We do use sphere collision but I want to limit the number of objects we have to test for the collision. We are not even doing a polygon test its just sphere but I still want to limit the number of tests.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!