Player Controller
Hollow Knight
Hero Image
Engine:Unreal Engine 4, Unity
Language:C++, C#
Tools Used:Visual Studio, Photoshop, After Effects
Duration:~1 month
Completion:2019

I made this player controller in Unreal Engine (initially) and also Unity by reverse-engineering the movement, jump, and power-up mechanics of Hollow Knight. It started as a way to understand why the controls felt so smooth and satisfying, and it quickly turned into a fun project. I built it from scratch, testing and tweaking constantly, and even added what I think is a fix to one of the mechanics in Hollow Knight's wall-jump system. It was a great way to learn and challenge myself, and I'm really happy with how it turned out. As a disclaimer, this project was purely for educational purposes.

I prepared a really simple demo where you can test the player controller. The focus was solely to recreate the smooth jump feel of Hollow Knight, so features like animations or advanced abilities were left out.

The jump system in this player controller uses Verlet integration, and I'm really happy with how robust and precise it feels. For comparison, I've included two versions of the jump system: one using Verlet integration and the other using Euler integration. Verlet is ideal for platforming and jumping mechanics because it maintains consistent jump precision even at lower frame rates. This makes it a great choice for ensuring smooth, reliable gameplay across different hardware, whether it's a high-end PC, a console running at 30 FPS like the Nintendo Switch, or a lower-powered device/mobile phone.

Euler integration, on the other hand, is simpler and more commonly used, but it comes with a tradeoff: it loses precision as frame rates drop. In practical terms, this means jump height decreases at lower frame rates, which could make certain platforms unreachable in a game that was designed with standard frame rates in mind.

To show this, I've added an FPS selector so you can toggle different frame rates and see how they affect the jump height in the Euler system, while the Verlet system remains unaffected.

Additionally, you can experiment with turning key mechanics on and off:

  • Wall Jump
  • Jump Input Buffer (which gives players a forgiving window to jump even when the player is not touching the ground yet)
  • Coyote Time (which allows a brief moment to jump after leaving a platform)

Toggling these options on and off (at normal frame rates) let you feel the impact of each feature and see how they contribute to responsive, satisfying movement.

For the best experience, I recommend using a controller. If you're on a keyboard, use WASD (A for left, D for right) and Space to jump.