0ad/source
wraitii 158cf8ea8d UnitMotion pushing improvements
The main change is the introduction of a 'pushing pressure' counter on
units. This counter increases when units get pushed around, and
decreases over time. In essence, units under high pressure move slower &
are harder to push around.
The major effect is that units can now get bogged down when very dense
groups start colliding. This makes movement more realistic, makes unit
movement more 'chokepointy', and generally improves the mathematical
soundness of the system (lower values are easier to handle for our 200ms
turns).

Other changes:
- The logic to detect units crossing each other's path has been
reworked. Units that run towards each other should not more obviously
avoid each other.
- New parameters: 'Spread' is a measure of how strong the pushing effect
is based on distance. With the current settings, static-pushing is
rather 'on/off', whereas moving-pushing is more gradual (and thus the
max influence distance was increased when moving).
- Default values have been tweaked for lower overlap.
- Units only looked at other units within their grid region. This led to
overlap near grid-borders. Units now look at neighboring grid elements,
which largely removes this issue. While this may be slower, the
performance of pushing was largely negligible before, so it is unlikely
to become a main cause of lag (and overlap was generally disliked by
players).
- Units no longer orient in the direction of pushing, but instead keep
facing their target. This can look slightly odd under very heavy pushing
forces, but vastly improves behaviour of very slow units such as rams
(since they spend much less time turning around). As a side-effect,
clean up angle code following acc780bcbb .

Engine changes:
- Add a debug rendering mode at compile-time to help understand what is
happening.
- Make it possible to constexpr initialise fractional fixed numbers by
using FromFraction

The 'pressure' change was inspired by alre's suggestion at
https://wildfiregames.com/forum/topic/56436-for-a-better-unit-movement/#comment-461987

Refs #6127

Differential Revision: https://code.wildfiregames.com/D4439
This was SVN commit r26245.
2022-01-24 15:36:13 +00:00
..
collada Forbids using more than 64 bones for GPU skinning. 2021-12-13 19:22:27 +00:00
graphics Fixes minimap texture scissoring rect following b5d85e279f. Fixes #6382 2022-01-19 17:40:26 +00:00
gui Moves blend state management to DeviceCommandContext. Fixes #6420 2022-01-19 17:28:47 +00:00
i18n Split ScriptRequest in its own header. 2021-05-03 16:07:26 +00:00
lib Uses MIPs for terrain textures previews following e4455a8e8f. 2022-01-24 07:00:55 +00:00
lobby Adds std namespace to shared_ptr usages in network and engine. 2021-05-22 19:28:40 +00:00
maths UnitMotion pushing improvements 2022-01-24 15:36:13 +00:00
mocks More FreeBSD build fixes. 2012-01-30 06:21:11 +00:00
network Fix false positive; undefined variable in NetworkClient.cpp 2021-09-09 18:00:17 +00:00
pch Include CStrInternStatic where necessary only. 2021-05-18 11:09:54 +00:00
ps Moves blend state management to DeviceCommandContext. Fixes #6420 2022-01-19 17:28:47 +00:00
renderer Fixes fancy water shores drawing after 1d9a8b2b0b. 2022-01-20 17:31:21 +00:00
rlinterface Split off JSON-related function from ScriptInterface, clean up headers. 2021-05-14 10:18:03 +00:00
scriptinterface Remove JS_New in favour of JS::Construct in preparation for SM91 2022-01-12 16:51:32 +00:00
simulation2 UnitMotion pushing improvements 2022-01-24 15:36:13 +00:00
soundmanager Removes mentions of legacy and unused GL calls, unifies AsFloatArray. 2021-10-11 12:39:01 +00:00
third_party Optimization for include resolving in PreprocessorWrapper. 2021-01-20 23:05:15 +00:00
tools Uses MIPs for terrain textures previews following e4455a8e8f. 2022-01-24 07:00:55 +00:00
main.cpp Allow to cap FPS up to the current max refresh rates of gaming screens: 360Hz 2022-01-13 14:30:23 +00:00
test_setup.cpp Implement a global task manager using a pool of worker threads 2021-06-03 14:48:38 +00:00