Quadtree Collision System
You’re working hard on a new game. You have many ideas and many items on screen at once that all need to be tested for collisions with each other. Unfortunately, your computer isn’t powerful enough to check for a collision between every object on screen without a severe drop in frame rate. At this point you could just decide to limit your game to less items, but that is the cheap way out and your game will never get anywhere like that! Instead you should use a quadtree collision system! In this article I will discuss what a quadtree is, and how to implement it in Python to improve the efficiency of a particle simulator. Although this tutorial uses Python for a particle simulator, the code is easy to understand and is useful in many other programming languages and applications!