SC2MapAnalysis
SC2MapAnalysis copied to clipboard
Feature request: cache distances to connected regions at start of game
Computing distances for region paths throughout the game is too intensive, since the calculation has to be done for each connected region in the path. This is more troublesome when 30-40 unique paths are found for example.
There are use cases where region paths need to be recalculated numerous times in a short period.
This needs to be implemented to complete #95
I like the idea, When would we want to recalculate the paths? if the only use case is when a path becomes blocked by a structure or something like that perhaps this can be avoided, by setting the paths to "assume" themselves to not be blocked, so the user then can add logic to filter out the paths that are not relevant to him/her (in this case, paths that contain structures blocking them )
When attempting to flank and the enemy is moving around, it is necessary to recalculate the flanking paths. But then again the user can filter out most of the paths since many end up at the same region before the enemy for example. I'm working on a flanking implementation that doesn't rely on constantly recalculating region connectivity paths, so perhaps this might not be needed, but might be useful data at some point anyway?