I have a bleeding-system set up in which bleeding units leave blood trails (images) while bleeding. Specific units (blood hounds) should be able to find and follow these trails once they get into a certain range.
Now, for this, i need a way to determine the nearest blood image to each blood hound patrouling around. Since many units can bleed at the same time, and many blood hounds can be roaming around, i would prefer not to use a O(n*m) algorithm for this, but im not sure how to do that.
Once way would probably be a quadtree, but i fear that it would degenerate quickly since most images will be very close to each other (its a blood trail after all).
Another way might be to put a dummy unit on every image and let natives (such as pick every unit in x range or the units gets in range event) do the job of finding the nearest image in a certain range. Then again, warcraft 3 doesnt typically behave too well with many units on the field.
What would be the better option? Or are there any other methods i have missed?
Now, for this, i need a way to determine the nearest blood image to each blood hound patrouling around. Since many units can bleed at the same time, and many blood hounds can be roaming around, i would prefer not to use a O(n*m) algorithm for this, but im not sure how to do that.
Once way would probably be a quadtree, but i fear that it would degenerate quickly since most images will be very close to each other (its a blood trail after all).
Another way might be to put a dummy unit on every image and let natives (such as pick every unit in x range or the units gets in range event) do the job of finding the nearest image in a certain range. Then again, warcraft 3 doesnt typically behave too well with many units on the field.
What would be the better option? Or are there any other methods i have missed?