rlcevg / CircuitAI

Spring RTS local native AI
GNU General Public License v2.0
18 stars 19 forks source link

Some circuit orders have massive Y on Mini Super Speed Metal Wide #97

Closed GoogleFrog closed 5 years ago

GoogleFrog commented 5 years ago

image

Note that this map crashes with stable ZK.

GoogleFrog commented 5 years ago

image

rlcevg commented 5 years ago

I thought leaving metal income in pos.y for the spot was harmless, plus i hoped no one will dare to play vs AI on a metal-area map, because of how quickly AI creates lag-fests with unlimited income :)

Just for the clarity: proper support of metal-area maps was not finished. Current method uses engine's Map::GetResourceMapSpotsPositions that returns at most 10000 discrete spots (that may not cover whole area), then AI selects small random portion (8x8: ~80; 24x24: ~240 spots) of those spots and plays as if it was casual map. GetResourceMapSpotsPositions returns income inside pos.y, but i guess getting actual height with Map::GetElevationAt or Map::GetHeightMap won't hurt much.

rlcevg commented 5 years ago

https://github.com/rlcevg/CircuitAI/commit/c73fdcb7a03361d7c361636a45accd3597ea600b