beyond-all-reason / beyond-all-reason/RecoilEngine
Planes seem to not follow player commands
- Dominant language
- C++
- Stars
- 679
- Forks
- 290
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 40
Description
Watch this Likho in this replay: https://zero-k.info/Battles/Detail/1815869

It goes to fire at a unit.

After it fires, a gadget replaces its attack command with a custom "seek out rearm pad" command. The important thing is that it receives a move goal and starts turning towards it.

The player then gives a move order almost directly behind it. The order happens to be slightly to the right of behind it, so the Likho comes out of its bank and starts turning right.

This makes the Likho fly straight for half a second or so, then start turning to the right. Which is enough for the AA to kill it.
This is all fine technically, but the real test is player experience. From the point of view of the player it looks like the plane fired, they told it to turn around, and instead it flew straight for half a second before turning.
I see three solutions:
- The engine decides that this situation is a pathfinding issue at a technical level. The Likho having to unbank then bank the other way takes it further from its move goal. The fix is some complicated turning prediction code deep in the flight model. And maybe this ends up breaking someone else's aircraft because their flight characteristics end up making the solver turn planes in directions that players did not intend.
- The engine skips all the above and just implements a per-unit configurable angle centred directly behind the plane. Game devs set the angle to tell planes to keep turning in their current direction if they are told to move there and already have some not-insignificant bank.
- I do the above with a bunch of hax in lua, but it is patchy and only works for some commands.
Contributor guide
Research direction
Start by reproducing the behavior using replay 1815869 and inspect the flight model and the command handling for a move order issued behind a banking plane. The issue names no files or tests, and completion is not defined because three different solutions are proposed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, lua
- Domain
- game-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100