I'm making an AIO fighter which will hopefully include relocation.
This is what I have:
Simba Code:
Procedure Relocate;
var x,y,i,testval:integer;
MP:TPoint;
TPA:TPointArray;
ATPA:Array of TPointArray;
begin
if not doRelocate then exit;
if not loggedin then exit;
FindNormalRandoms;
TPA:=GetMiniMapDots('y'); //get MM dots, store to array
SortTPAFrom(TPA,Point(mmcx,mmcy));
if (distance(MMCx,MMCy,TPA[0].x,TPA[0].y) < 30) then exit; //quick check if we actually need to
atpa := SplitTPA(tpa,30); //break into parts
testVal := 0;
for i:= 0 to high(atpa) do //basically, it finds the TPA in the ATPA with the most dots
begin
if High(atpa[i]) > testVal then
begin
TestVal := I; //and stores the index of that TPA here
end;
end;
MP := MiddleTPA(atpa[testval]); //calculates the middle of that TPA
SMART_DrawDots(atpa[testval]);
mouse(MP.x,MP.y,5,5,mouse_left); //click
FFlag(5); //wait
end;
TL;DR it finds the area of highest concentration of yellow MM dots, and clicks there. The problem is when a dot gets in the very edge and messes everything (middle of the area then moves to somewhere we may not want to go).
Thus, I had a few ideas on how to solve this issue:
1) Generate an objectDTM right off the bat.
2) SPS? Wouldn't necessarily work underground, unless the user set it to do so. And would you have to load every single area too?
3) Create a bitmap, filtering out all minimap dots (and symbols?)
4) Somehow improve my current method's accuracy
5) Filter out dots that are behind minimap walls, like so:

(orange area would be filtered out, btw.)
I don't know how, or if it could be done (ideally with minimal resource use)
The problem is, while all of these ideas would likely work, I want to minimize resource consumption if possible. And then there's also the actual doing it.
So, what do you think is the best way to do it? And how would you go about it?