Click here to Skip to main content
15,885,954 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi dear
I try to develop a new game in c# with XNA.
you know that in game we should check collision between objects in each time. but when we create too many object, collision detection is very harmful for my project because it take too much time.
I googled it so i found that i have to use neighbor list to reduce check counts.
can u help me or did you saw this code already.
best regard
Posted

Actually what I think you are looking for is Binary Space Partitioning (BSP) trees. They are a tried-and-true method for finding objects that are near other objects, which will cut down on your collision detection code.

https://www.google.com/search?q=bsp+tree+collision+detection[^]
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 9-Nov-13 0:16am    
This is informative enough, my 5, but I think my answer is more adequate to the situation. :-)
—SA
Ron Beyer 9-Nov-13 0:18am    
Yes indeed! +5'd yours.
Sergey Alexandrovich Kryukov 9-Nov-13 5:38am    
Thank you, Ron. :-)
—SA
Software development is done not by "seeing" "this code", but by writing code, which is performed by using developer's brain.

Good luck,
—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900