Page MenuHomeWildfire Games

Make rasterisation strictly more permissive than real static obstruction shapes (alternative take on D1869)
Needs ReviewPublic

Authored by wraitii on Wed, May 8, 6:21 PM.

Details

Reviewers
None
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Summary

This is an alternative take on making the short and long-range pathfinder consistent.
In this differential, I simply make the pathfinder grid the reference for static obstruction. Movement is never checked against static shapes, only against unit shapes. The vertex pathfinder should be more permissive than the long-range pathfinder, thus we won't get stuck.

The positive of this diff is that trees, for example, have a much smaller long-range footprint, which will improve pathfinding in forests and such drastically.

Test Plan

Test the new behaviour.

Diff Detail

Event Timeline

wraitii created this revision.Wed, May 8, 6:21 PM
wraitii added a subscriber: Itms.Wed, May 8, 6:23 PM

@Itms Do you remember a reason why this wasn't done in 2015/16? I feel like this is a strictly better approach than our current one, and it can be combined with D1869 for maximal safety.

Itms added a comment.Wed, May 8, 6:33 PM

I agree that this looks nice at first sight. I just followed Philip's concept regarding clearance, and then did some tuning to reduce the number of stuck units... This should be tested a lot but I don't see any conceptual issues with this.

Stan added a subscriber: Stan.Wed, May 8, 6:51 PM
This comment was removed by Stan.
Vulcan added a comment.Wed, May 8, 6:52 PM

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

Linter detected issues:
Executing section Source...

source/simulation2/helpers/Rasterize.cpp
|   1| /*·Copyright·(C)·2015·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2019" year instead of "2015"

source/simulation2/components/ICmpObstructionManager.h
|   1| /*·Copyright·(C)·2018·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2019" year instead of "2018"

source/simulation2/components/CCmpObstructionManager.cpp
|   1| /*·Copyright·(C)·2018·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2019" year instead of "2018"

source/simulation2/components/CCmpObstruction.cpp
|   1| /*·Copyright·(C)·2018·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2019" year instead of "2018"
Executing section JS...
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/differential/1345/display/redirect

wraitii updated this revision to Diff 8005.Mon, May 13, 7:21 PM

Make this usable on svn.

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

Linter detected issues:
Executing section Source...

source/simulation2/helpers/Rasterize.cpp
|   1| /*·Copyright·(C)·2015·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2019" year instead of "2015"

source/simulation2/components/CCmpObstruction.cpp
|   1| /*·Copyright·(C)·2018·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2019" year instead of "2018"

source/simulation2/components/CCmpObstructionManager.cpp
|   1| /*·Copyright·(C)·2018·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2019" year instead of "2018"

source/simulation2/components/ICmpObstructionManager.h
|   1| /*·Copyright·(C)·2018·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2019" year instead of "2018"
Executing section JS...
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/differential/1391/display/redirect

nani added a subscriber: nani.Mon, May 13, 9:45 PM

Seems all units are causing considerable lag if they try to/want to go to the same position (with time the lag increases even more).


Some units go to the destination point but at collision go randomly (opposite way?) somewhere and return (inthe end all go and stay in the circle)

nani added a comment.Mon, May 13, 9:51 PM

Replay: look at the houses for stuck units