new metal spot finder class
Posted: 13 Oct 2005, 17:02
new metal spot finder class: http://www.fileuniverse.com/?p=download ... ip&ID=1619
Works better then anything yet released:)
for now just use Initialize() function and it will draw all the mexes on the map, and put sorted array of spots into metalpatch list. (might want to tweak with the minMetalOnSpot and minProduction variables if anything goes wrong)
Try on maps like small divide, redhaven.
Not optimized/not using caching yet/ better not use on metalmaps (I'll add this later) /function to include already builded mexes will be later
What's important here is the algorythm:
Goes through metal map, when finds a free spot(other mexes checking) checks all spots within radius on which a mex can be built with maximum production (checks other mexes intersecting for production).
This way it's very area-effective.
Might want to remove checking for mexes structures themselves intersecting as this shouldn't be needed.
Works better then anything yet released:)
for now just use Initialize() function and it will draw all the mexes on the map, and put sorted array of spots into metalpatch list. (might want to tweak with the minMetalOnSpot and minProduction variables if anything goes wrong)
Try on maps like small divide, redhaven.
Not optimized/not using caching yet/ better not use on metalmaps (I'll add this later) /function to include already builded mexes will be later
What's important here is the algorythm:
Goes through metal map, when finds a free spot(other mexes checking) checks all spots within radius on which a mex can be built with maximum production (checks other mexes intersecting for production).
This way it's very area-effective.
Might want to remove checking for mexes structures themselves intersecting as this shouldn't be needed.