/// <summary> /// the coordinate map that tells what region(color!) a subtile belongs to /// </summary> public ushort AllSubtiles;
This array uses the most memory. It covers the whole map and can be about 750 * 750 in size. That's about 1 MB. Then there is some additional data also, and each faction has 3-6 of these region maps...
I am thinking now about subdividing the map into square sections, about half a screen wide. The flood fill would stop at the border between sections.
Then, the region maps that belong to factions could disregard most of the sections, and just leave them empty. When I create the graph, I could link up with the underlying, full region map whenever there is a hole/empty section.