Page MenuHomeWildfire Games

Additional pathing points around static obstructions
Needs ReviewPublic

Authored by Crynux on May 21 2019, 6:49 AM.


Group Reviewers
Restricted Owners Package(Owns No Changed Paths)

In testing I noticed there were some path-finding issues when you have 2 somewhat equally sized static obstructions (specifically tasking between a Stone for example, and a dropsite). Here, I've added 4 additional points to each static obstruction. These points are used in path-finding to give the pathfinder more options when looking for paths, when no other objects are around.

Test Plan

I've tested this a few times locally, with a set test case of 20 workers building a dropside, then going to mine stone. Overall, there's an improvement in how fast they find a valid path, and get to their destination... which I believe will lead to a performance increase overall; because if they get where they're going faster, they'll spend less time computing how to get there.

Beyond that, it may be worth while to test it in a game ... which I'll likely do soon.

Diff Detail

rP 0 A.D. Public Repository
Lint OK
No Unit Test Coverage
Build Status
Buildable 7556
Build 12320: arc lint + arc unit

Event Timeline

Crynux created this revision.May 21 2019, 6:49 AM
Owners added a subscriber: Restricted Owners Package.May 21 2019, 6:49 AM
Crynux updated this revision to Diff 8093.May 21 2019, 6:51 AM

Attempt to remove unwanted directory additions.

Crynux set the repository for this revision to rP 0 A.D. Public Repository.May 21 2019, 6:58 AM
Crynux edited the test plan for this revision. (Show Details)May 21 2019, 7:00 AM
Crynux updated this revision to Diff 8094.EditedMay 21 2019, 7:07 AM

Updated so the build stuff works ... I think.

This is an interesting idea, though our patch is going to conflict with several of my own vertex pathfinder patches, including some that I believe fix the issues you've noted. I'll review this when said patches are committed.

@Crynux Could you look at D1908? I think it fixes the same issue that you are trying to fix here.

Crynux added a comment.Jun 2 2019, 8:46 PM

@Crynux Could you look at D1908? I think it fixes the same issue that you are trying to fix here.

@wraitii Yep - did some quick tests. It seems to be an improvement over the existing implementation. However, in some cases it's still possible for units to not find their way round the outer corner.

wraitii added a reviewer: Restricted Owners Package.Jun 12 2019, 10:33 PM