#3280 closed enhancement (fixed)
Formation pathfinding should take obstructions into account.
Reported by: | sanderd17 | Owned by: | |
---|---|---|---|
Priority: | Should Have | Milestone: | Alpha 26 |
Component: | Core engine | Keywords: | |
Cc: | Patch: |
Description (last modified by )
This is a proposal to make formation pathfinding better next to big obstructions. The problem is that formations should avoid obstructions as much as possible, but should also be able to pass small obstructions (like a tree) without doing too much effort.
The patch can be applied to the current pathfinder branch: https://github.com/na-Itms/0ad/commit/54b918ecdb57bfd58e2ad064beaca8a45a2ada79 So it works with the new pathfinder.
There's also a pdf explaining the changes.
Note that only the move-to-point command is implemented now. So gather or attack commands will result in an error.
Attachments (4)
Change History (9)
by , 9 years ago
Attachment: | formation_pathfinding.diff added |
---|
by , 9 years ago
Attachment: | formation_pathfinding.tex added |
---|
by , 9 years ago
Attachment: | formation_pathfinding.pdf added |
---|
comment:1 by , 9 years ago
Description: | modified (diff) |
---|
comment:2 by , 9 years ago
by , 9 years ago
Attachment: | formation_pathfinding.2.diff added |
---|
comment:4 by , 21 months ago
Keywords: | patch removed |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Summary: | [PATCH] Formation pathfinding should take obstructions into account. → Formation pathfinding should take obstructions into account. |
Somthing to deal with this problem was added with the two commits:
1) https://code.wildfiregames.com/rP26801 :
Allow setting the passability class dynamically. This is needed to improve formation behavior for the release.
Accepted by: @Freagarach Refs: Phab:D4563, Phab:D4605 Differential Revision: https://code.wildfiregames.com/D4599
_ _ _ _ _ _ _
2) https://code.wildfiregames.com/rP26865 :
UnitMotion - Fix Clearance serialization and only allow changing passability of formation controllers.
Fixes rP26801
Changing the passability class at runtime breaks some UnitMotion assumptions in unrecoverable ways and will lead to units getting into impassable terrain. Formation controllers can tolerate it since units still check their own obstruction. Until some code is added to recover from the above bad case, de-activated changing passability class for non-formation controllers.
This also fixes serialization issues related to clearance & passability classes following that diff.
Reviewed By: Freagarach
Differential Revision: https://code.wildfiregames.com/D4629
comment:5 by , 21 months ago
Milestone: | Backlog → Alpha 26 |
---|
Ok, turning formations doesn't work as I wanted (see updated patch). Without bending, it doesn't result in a nice visual.
When focusing on long-distance formations, I think we should consider the following:
The first row can calculate the path of the least resistance, just like the entire formation does now. Then it can leave a breadcrumb trail for the other rows to follow.