Well since i was having so many issues with my quadtree i decided that i would write something to graphically represent it and here it is!
[Only registered and activated users can see links. Click Here To Register...]
This is atually really important for me, it shows that the quadtree is not performing as intended, i engineered it to have a 5 object limit, and after that it should subdivide again, as you can see theres a node with 12 objects in it, well this simply will not do! It also i discovered does not update when an entity enters/exits a node. And also after speaking to an NPC the entity does not move within the quadtree at all! This is because if me modifying the Entity in anouther app and performing an update, the quadtree treats it as a different Entity and doesnt continue to update its movements, previously it made a duplicate of it and moved that instead.
All in all this is pretty interesting for me and probably pretty dull for you lot, but thought i would share anyways.
Edit:
Ok so i continued working on this after this post and managed to fix a number of my issues and heres an example of map the size of Twin City with a 5 object per node cap on it and 15k npcs spawned.
Note this is just an example, the object cap would be atleast 10 probably. Alot of people dont really understand the reason for having a system like this, ive been trying to explain it to Haydz for a while as hes interested in its benefits, hopefully this picture will make sense.
[Only registered and activated users can see links. Click Here To Register...]
Basically, when performing a query the only nodes (the black boxes) which will be queried will be the ones which intersect with the red box, and then only black dots which intersect with the red box will be spawned, since the red box denotes the area which a client can see.