Commit Graph

3 Commits (720ad7888cc7b742932b6a1b701d462629cd24fd)

Author SHA1 Message Date
Nikolay Petrov c54c9fd6ae feat(movement): implement jump system and air physics (Phases 13-14)
Implemented a responsive, deterministic jump system with "game feel" enhancements and advanced air physics.

Changes:
- **Jump Logic**: Added variable jump height (hold/release control).
- **Game Feel**: Implemented Coyote Time (jump after leaving ledge) and Jump Buffering (early input registration).
- **Air Physics**: Added non-linear gravity (FallingGravityScale) for snappy jumps and Terminal Velocity clamping.
- **Landing**: Added OnLanded delegate with heavy/light landing detection based on impact velocity.
- **Config**: Added auto-calculation logic in PostEditChangeProperty to derive Gravity and JumpVelocity from desired JumpHeight and TimeToApex.
- **Debug**: Added on-screen debug messages for Velocity Z and movement state.
- **Fix**: Moved delegate declaration to global scope to fix blueprint visibility issues.

Relates to: Phase 13, Phase 14
2025-12-26 01:45:13 +05:00
Nikolay Petrov b83388e74e feat(movement): Implement fixed timestep physics with interpolation (Stage 12)
BREAKING CHANGE: Movement now runs on deterministic 120Hz physics
- Physics and render states separated
- Visual interpolation for smoothness
- Deterministic physics independent of FPS

Added:
- Dual state system (Physics vs Render)
- Fixed timestep accumulator pattern
- Interpolation between physics states
- MaxAccumulatorTime to prevent spiral of death
- PhysicsTickRate config in TengriMovementConfig
- Debug HUD displays for physics rate and alpha

Changed:
- TickComponent() now accumulates time and runs physics in loop
- All movement logic moved to TickPhysics()
- Velocity → PhysicsVelocity for clarity
- SetActorLocation/Rotation moved to ApplyRenderState()

Performance:
- Added ~0.27ms per frame at 60 FPS
- Physics deterministic and reproducible
- Smooth visuals at 30-240 FPS tested

Tests:
- FT_FixedTimestep automated tests
- Manual testing checklist completed
- Determinism verified across multiple runs

Documentation:
- TDD.md updated with fixed timestep section
- Stage12_DecisionLog.md created
- Inline comments for all new methods

Refs: Roadmap.md Stage 12
2025-12-24 20:46:43 +05:00
Nikolay Petrov 963e7a34dc rewrite movement to c++ 2025-12-24 19:34:13 +05:00