I have been thinking of using different patterns, such as chevron shape, or at least changing the fill pattern of a circular (hexagonal, really) search area that "spirally" considers.
The limiting factor for me has been coding an offset map for each pattern, or an algorithm to create one (either once initially and storing, or on every request)
One pattern I really see a need for is "farthest away positions first" within a given area. I think a simple way to find this is
iterate over a really large spiral in reverse order (outermost position first)
designate a much smaller area starting at one of the designated "corner" positions that the AI uses already... basically counting outward X tiles from the center of the large spiral in each of the six directions
if any position falls within the smaller area, store it, otherwise skip it
This should result in an "outermost first (relative to the center of the larger spiral area) fill area" that can be used to place buildings as close to territory borders as possible while still being within the resource search/scoring area used to choose that area for building placement.
I have been thinking of using different patterns, such as chevron shape, or at least changing the fill pattern of a circular (hexagonal, really) search area that "spirally" considers.
The limiting factor for me has been coding an offset map for each pattern, or an algorithm to create one (either once initially and storing, or on every request)
One pattern I really see a need for is "farthest away positions first" within a given area. I think a simple way to find this is
This should result in an "outermost first (relative to the center of the larger spiral area) fill area" that can be used to place buildings as close to territory borders as possible while still being within the resource search/scoring area used to choose that area for building placement.