1
DF Dwarf Mode Discussion / Re: !!SCIENCE!! Thread: Operation FPS Bomb
« on: March 22, 2012, 03:36:20 pm »
I highly doubt the items would just be stored in some giant vector. Even at minimum something where specific item types store themselves as a separate vector.
I'd think something like a cached octtree would be ideal too having a dorf find a needed item nearest quickly as he could quickly eliminate whole regions of the map as not containing said item. So instead of having to iterate a whole list of an item to determine the nearest you just trawl through an octtree till you reach the closest leaf node.
I'd think something like a cached octtree would be ideal too having a dorf find a needed item nearest quickly as he could quickly eliminate whole regions of the map as not containing said item. So instead of having to iterate a whole list of an item to determine the nearest you just trawl through an octtree till you reach the closest leaf node.