limit_physics_monoids
overrides monoids controlling player physics provided by player_monoids, to limit how big they can grow.
limit_physics_monoids
overrides monoids controlling player physics provided by player_monoids, to limit how big they can grow.
why
the physics overrides are multiplicative factors controlling player speed, jump strength, and gravity.
it may make sense for one mod, or another, to double the speed of a player. however, there's multiple reasons to not scale them multiplicatively, or even additively.
- IRL, doubling your speed requires quadrupling your energy input. doubling your speed twice requires increasing your energy input 16x. these energy requirements get even worse when you take air resistance and other friction into consideration.
- in minetest, you generally accelerate to maximum speed almost instantly. (i've just discovered the movementacceleration* parameters, and there's a pending PR to add these to the physics overrides...)
how
the composed (folded) result value for the physics trait is passed through a "limiter" function, which scales the value.
properties of a limiter:
-
continuous
-
nondecreasing
-
f(0) = 0 it should remain possible to completely disable the functioning of the physic
-
f(1) = 1 no change should remain no change.
-
f\'(x) differentiable, decreasing when x > 1 it should decrease smoothly.
3 limiters are currently provided:
-
atanh values increase near-linearly at first, but drop off to a constant maximum.
-
gamma growth is limited by a constant exponent
-
log__n growth is limited as log^n, which is "flatter" than gamma, but trickier to optimize
| limiter | param_1 | param_2 | 0 | 1 | 2 | 4 | 8 | 12 | 16 | 32 |
|---|---|---|---|---|---|---|---|---|---|---|
| gamma | 0.57 | N/A | 0 | 1 | 1.48 | 2.20 | 3.27 | 4.12 | 4.86 | 7.21 |
| log__n | 2 | 0.1 | 0 | 1 | 1.65 | 2.49 | 3.49 | 4.12 | 4.59 | 5.76 |
| tanh | 3 | N/A | 0 | 1 | 2 | 3.37 | 4.05 | 4.11 | 4.11 | 4.11 |
Links
- Source: https://github.com/fluxionary/minetest-limit_physics_monoids.git
- Issues: https://github.com/fluxionary/minetest-limit_physics_monoids/issues
- Website: https://github.com/fluxionary/minetest-limit_physics_monoids
- Donate: https://github.com/sponsors/fluxionary/
- Original ContentDB page: content.luanti.org/packages/rheo/limit_physics_monoids/
License
LGPL-3.0-or-later
Media license: CC-BY-SA-4.0
Development state
ACTIVELY_DEVELOPED
| Version | Date | Min engine | Size | Download |
|---|---|---|---|---|
| 2024-09-12 | 2024-09-12 02:12:53 | 5.7 | 126.6 KB | Download |