Adjust speed, stride and posture of units walking up and down hills
Units that march over a hill at the same speed and in the same pose as on flat ground feel pasted onto the map. Going up and going down are not mirror images, and the slope that matters is the one along the walking direction, not the steepest one. This entry turns terrain into the right numbers.
Why this works
What slows a walker is the slope along the way they go, not the steepest slope of the ground. Uphill costs effort, while downhill helps only a little before people brake for safety. The body then shows it through shorter steps and a leaning posture.
When not to use it
Wrong for flat maps, or for games where fairness matters more than realism, such as a competitive strategy game where every player must know the exact speed everywhere. There, keep one fixed speed and show hills only as decoration.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 3 common mistakes and the fix
- 26 lines of example code with 3 checks that pass
- How your AI shows you that it works
Say this to your AI
Use the Spielerando entry "Adjust speed, stride and posture of units walking up and down hills" (read_entry soldier-on-a-hill-adjusts-speed-stride-and-posture-by-slope) in my game. Build it step by step, and show me how you checked that it works.Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP