|
-
[CS3] My Quadtree Attempt
In the search for more efficient collision detection I decided using a quadtree was the way to go. I've think I've made good progress now. I've posted an example on my blog here.
Press Q to show the nodes when the test has started. It doesn't actually do any collision detection yet. This is just a demonstration to show how the quadtree is being built. The example isn't optimized in any way (I should be using filled rectangles instead of empty rectangles).
-
M.D.
awesome, trees are the best. Green and full of data.
-
Senior Member
This is an interesting method. Can an object belong to more than one node ?
I read on your blog you will share the code once it's opimized, thx for sharing.
-
Yes an object can be in several nodes at the same time. I'm going to complete a game first before sharing the quadtree source which itself is very simple once you understand it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|