ZeroK-RTS / Zero-K

Open source RTS game running on the Spring/Recoil engine
https://zero-k.info
GNU General Public License v2.0
666 stars 200 forks source link

Improve formation rank custom formations. #4961

Open GoogleFrog opened 1 year ago

GoogleFrog commented 1 year ago

There are two issues with formation rank at the moment.

Here are two approaches for the second issue.

The best solution probably involves the first approach with a bunch of heuristics and fallbacks for various edge cases.

sprunk commented 1 year ago

I don't think this is fully solveable because sometimes the same line can mean two things. Consider two situations: image I'm getting pushed and I want to retreat a bit. The formation should stay the same, i.e. riots are north of the arty.

image I got flanked and I want to reposition. The formation should reverse, the riots should move south of the arty.

Drag direction solves this and is also how it works in other games where facing matters (for example Total War series).

GoogleFrog commented 1 year ago

Hm I guess so. Being the best of the viable options doesn't mean it isn't confusing though.

sprunk commented 1 year ago

Sure. Worst case there could be yet another checkbox

[x] Use heuristics instead of drag direction