Monday, July 24, 2006

More quadtree poking. Currently items can be dragged and dropped around the quadtree area. Actually the only items a small rectangle drawn in using GDI, it lights up yellow when the mouse moves over it.
The codes become quite unclean. Here's the most horrible thing in it at the moment:

void OnNodeWantsToChangePosition(INode n, float x, float y)
n.UnsafeSetPosition(x, y);

Not very elegant casts that really shouldn't be required. Moving through a quadtree isn't very efficent, which is cool because they're generally for static stuff (my items). So when to move something in a quad I take it out of the tree, changes it position then replace it in the tree.

Still quite busy - I'll be going to Tokyo on the 31st for five days before returning to Old Bilayati. Upon arriving I guess I'll be quite busy again for a while. And soon I'll start University doing a masters in game programming - I'm considering doing a write up of all lectures here, so that's something to look forward to.
Post a Comment