Movement System
Overview
The movement system was completely rebuilt to support flexible, responsive player control through a Hierarchical Finite State Machine (HFSM). Earlier iterations suffered from floaty jumps, velocity issues, highly limited state flexibility, and bad code practice. By starting from scratch and decoupling movement logic from legacy systems, the final system supports modular state behaviors, dynamic interactions, and smoother, more reliable movement.
Details
This iteration uses a state-driven architecture where each movement action is controlled by its own state customizable parameters. These states commonly make use of animation curves allowing designers to fine-tune behaviors without touching code. The system also supports simple slope handling, direct control over velocity changes, like when dashing. Additionally, by unifying player movement logic with the same architecture as the enemy AI, consistency across code was significantly improved.
Additions
Once I took over the movement system, I rebuilt it from the ground up focusing on core fundamentals to make movement feel responsive, grounded, and satisfying. The result was a system that replaced the previous floaty feel with tighter, more natural control. From there, I layered in additional features to enhance gameplay feel, including basic slope handling, animation curves to fine-tune settings, and a dynamic wall kick system. Rather than a generic double jump, the wall kick offered contextual mobility, activating only when near a wall. Jump direction and force were adjusted based on player input and wall normals, ensuring smoother, more intuitive interactions, especially when bouncing off uneven or angled surfaces.
Features
Fully modular HFSM-based movement states
Animation curves for fine tuned controls
Wall Kicks to enable vertical recovery and range
Basic slope handling to improve terrain navigation and collision
Decoupled, scalable structure shared with AI for consistency