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.
Contributed Breakdowns
MOVEMENT SYSTEMS
Features
Some of the features built in for gameplay enhancement:
Fully modular HFSM-based movement states
Movement tech like dash jumping and wall springing for advanced players
Animation curves for fine tuned controls
Wall Kicks to enable vertical recovery and range
Slope handling to improve terrain navigation
Decoupled, scalable structure shared with AI for consistency
Timeline
Iteration 1
The first iteration of the movement system featured a factory pattern. It’s states were built at runtime and almost all of it’s values lived in the script itself. After deliberation I decided to take over the movement system and refactor it in iteration 2.
Factory Pattern Finite State Machine
Iteration 2
After taking over I worked tirelessly to bring it to player and coding standards. First was shifting away from the clunky factory pattern and inheriting the Hierarchical Finite State Machine base. After the refactor it was responsive, well received, and despite limitations full of life and features.
Hierarchical Finite State Machine
A history
Showcase
What Went Right
The final design of the movement system feels really fun to play with, that in it of itself is an achievement I am proud of. Coming from where the movement was and where it ended at, I couldn’t be happier. The movement also has features that I think came out nicely and add an extra level to the mastery some players can achieve. This was slightly calculated but definitely originally conceived itself as a happy accident. The decision to let the airborne state affect air control and resistance differently let stuff like hopping to preserve forward motion really important. Combine that with the fact that dashing followed by immediately hopping would be just a bit faster than running on the ground do to the instant velocity change dashing offered. I also enjoyed the difference between a jump and wall jump. One was additive and the other was a velocity change. the result was in some instance upward motion combined and you were able to get a lot more height which was fun. I also really enjoyed how simple and how much wall kicking added to the game. It was definitely the additional layer the game needed to feel unique and fun.
What Went Wrong
Considering we left the movement system and it’s developer unchecked for so long was our fault collectively as a team. When it finally spiraled out of control we were forced to perform a rewrite which put a lot of pressure on the developers needing to test things and me the programmer scrambling to fix things when I had other systems to take care of.
Other than that an issue I wasn’t proud of was the fact that the slope handling works fine up hills but not down hills. When the player has enough forward momentum they can leave the bounds of the slope and go airborne before they land on the ground again. It felt almost like a staircase.
I also regret not being able to take full advantage of my features like wall kicking on oddly shaped surfaces to make more interesting levels. Of course I also had other feature ideas that didn’t make it which I was slightly bummed with. I had traps that could directionally launch the player, or explosions that would push the player outward like a rocket jump. Things that didn’t make it to the final build.