XNA QuadTree

Gary and I have designed and worked on a QuadTree implementation for our XNA games. A QuadTree is an efficient way to store and retrieve spatial objects by location. You can read about them on Wikipedia. The source code, DLL, and testing applications are all available on our project on Bitbucket. I would recommend checking the code out using Mercurial, then adding the project to your game’s solution so that you can get all future updates.

I use this project for Asteroid Outpost to quickly see if entities are intersecting, or look for entities in a certain range, or figure out what is visible on the screen.

Here are some screenshots of the testing tools that are provided:

A normal usage example. The rectangle represents what the user can see and is moved around with the mouse

A normal usage example. The rectangle represents what the user can see and is moved around with the mouse

A performance tester that I've used to determine performance changes

A performance tester that I’ve used to determine performance changes

A visual test that allows the user to see the quads while adding and subtracting objects

A visual test that allows the user to see the quads while adding and subtracting objects

  • http://www.diliupgabadamudalige.com/index.php?action=home Diliupg

    I downloaded quad tree but it does not run on VS2017. I will try to build a new project. In the mean time how is it used in a program? A litte tutorial perhaps or point in a direction? :) Thank you very much.