Page MenuHomeWildfire Games

Unit Motion - optimisations to avoid recomputing paths too often
ClosedPublic

Authored by wraitii on Jul 13 2019, 2:29 PM.

Details

Reviewers
None
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Commits
rP22474: Unit Motion - optimisations to avoid recomputing paths too often
Summary

3 things:

  • Assume a certain incertain based on distance to the target, to avoid recompute paths every turn when the target is far way and moving.
  • Handle cases where the target is unreachable to the long-range pathfinder and we would be recomputing every turn.
  • If we went straight, assume we don't need to recompute a path.

These together mean entities recompute paths far less often.

Test Plan

Order units somewhere impassable: notice paths don't get recomputed every turn.
Order an infantry unit to guard a cavalry and move the cavalry away - notice how the path doesn't get recomputed after a while.

Diff Detail

Event Timeline

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/47/display/redirect

wraitii updated this revision to Diff 8859.Jul 13 2019, 5:55 PM

Rerun tests

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/51/display/redirect

This revision was not accepted when it landed; it landed in state Needs Review.Jul 14 2019, 1:08 PM
This revision was automatically updated to reflect the committed changes.