Sign in to follow this  

Data structure to use for holding objecting in scene

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

This topic is 4399 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this