DDraceNetwork Movement Guide
Gravitation: Every tick the acceleration of 0.five is introduced to they speed (downwards).
Input (Horizontal Movement)
- Pressing nothing:
- -Air: Every tick velocy.x = velocy.x * 0.95
- -Ground: Every tick velocy.x = velocy.x * 0.five
- Pressing key in contrary path:
- -Ground: Every Tick horizontal speed decreases through 2 till 10 withinside the contrary path is reached
- -Air: Every Tick horizontal speed decreases through 1.five till -five withinside the contrary path is reached
- Horizontal accelerate through pressing a or d:
- -Ground: Every Tick horizontal speed will increase through 2 till 10 is reached
- -Air: Every Tick horizontal speed will increase through 1.five till -five is reached
Max Speed
Max speed: 6000 Sub-tiles/Tick (+speedup in a single tick, e.g. gravity, jetpack, explosion).
src/game/gamecore.cpp (Earlier than calculating new role from speed):
- if(length(m_Vel) > 6000)
- m_Vel = normalize(m_Vel) * 6000;
This is the bottle neck in vertical motion. In horizontal motion a “ramp”-Value is extended to the horizontal pace. Causing the tee to sluggish down and prevent whilst getting too fast. This is maximum normally found in pace ups.
The pace is rounded right all the way down to a precision of 1/256 each tick. This is inflicting the tee to prevent transferring horizontal whilst having an excessive amount of pace.
Todo:
- Convert sub-tiles/tick into tiles/sec
- Locate max vel und actual max vel (from in which could a consistent feature fit)
- Locate pace, in which the tee stops transferring
- Write approximately ramp pace, and upload diagram