beyond-all-reason / beyond-all-reason/RecoilEngine
Add moveDef parameters to control descent speed
- Dominant language
- C++
- Stars
- 679
- Forks
- 290
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 40
Description
MoveDef's slow down on climbing is defined with **slopeMod** parameter.
This does not affect the descent speed however: descending goes seemingly as fast as with no slope at all, only climbing slows the unit. Which is completely fine for a wide range of cases.
But consider this: we want to make a unit with very good climbing ability. Not like all-terrain, but still quite good. Now, if you make it run downhill, it would look completely unrealistic/out of touch. Unit is supposed to step down carefully, not run at full speed ahead, so the slow must be applied like for climbing. But there should also be a minimum slope value, from which this slow starts to kick in. Because, naturally, unit should not be slowed at all if the slope change is small, so the effect does not become aggravating.
So I suggest to add 2 parameters: _descentSlopeMod_ (default: 0) and _descentSlowSlope_ (default: 0).
First one will give freedom to define a different slopeMod on descent. It could be same as slopeMod, of course, but I think such option is necessary to define good behaviour.
And the second parameter would define aforementioned slope value, from which the slow effect smoothly starts to kick in.
Contributor guide
Research direction
Start by tracing how MoveDef currently uses slopeMod for climbing and where descent speed is calculated. Review the movement behavior around slope changes before deciding how descentSlopeMod and descentSlowSlope should interact. Done means both parameters are supported with the stated defaults, descent slowing begins smoothly at the configured threshold, and existing climbing behavior remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- game-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100