I\'m working on a 2D game that has a huge amount of dynamic entities. For fun\'s sake, let\'s call them soldiers, and let\'s say there are 50000 of them (which I just randomly t
The whole point of selecting a good spatial hierarchy is to be able to quickly select only the objects that need testing. (Once you've found out that small subset, the square-root is probably not going to hurt that much anymore)
I'm also interested in what the best / most optimal method is for 2d spatial indexing of highly dynamic objects.
Quadtree / kd-tree seem nice, but they're not too good with dynamic insertions. KD-trees can become unbalanced.
Just a random thought, if your entities are points a double insertion-sorted structure (by X and Y) in combination with a binary search might be something to try..?