A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: [CS3] My Quadtree Attempt

  1. #1
    Developer
    Join Date
    Apr 2007
    Location
    UK
    Posts
    324

    [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).
    now known as dVyper

  2. #2
    M.D. mr_malee's Avatar
    Join Date
    Dec 2002
    Location
    Shelter
    Posts
    4,139
    awesome, trees are the best. Green and full of data.
    lather yourself up with soap - soap arcade

  3. #3
    Senior Member Sietjp's Avatar
    Join Date
    Jan 2005
    Location
    Paris, France
    Posts
    711
    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.

  4. #4
    Developer
    Join Date
    Apr 2007
    Location
    UK
    Posts
    324
    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.
    now known as dVyper

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center