Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make use of calculatePath to restrict areas #28

Open
nomisum opened this issue Jun 9, 2019 · 4 comments
Open

make use of calculatePath to restrict areas #28

nomisum opened this issue Jun 9, 2019 · 4 comments
Assignees

Comments

@nomisum
Copy link
Contributor

nomisum commented Jun 9, 2019

Current implementation doesnt allow for 100% restricted areas.

What we could do here is use the new calculatePath to check each Node with _nodePosition inArea "mrk_restrictHere_1" and send the units its merry way or recalculate with new positions if necessary.

@nomisum
Copy link
Contributor Author

nomisum commented Jun 12, 2019

calculatePath takes a while and is still a bit bugged (executed twice). still it might work.

current concept:
take 4 random points ABCD
calculate path AB
check each generated node if its in restricted area
if one is, retry with another position B else begin checking BC
save path generated
rinse repeat until all positions are verified
apply all individual nodes as waypoints

@Fusselwurm
Copy link
Member

some work has already been done on https://github.com/gruppe-adler/grad-civs/tree/areaRestriction

@Fusselwurm
Copy link
Member

@Fusselwurm
Copy link
Member

see also #63

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants