- Published on 2011-04-05
- Written by John McDonald
Me and a friend of mine, Gary, 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 the Wikipedia page. 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: