Character Movement

Today I spent way too much time on my character movement controller. It turns out, this part is more complicated than I expected. But it’s so important to get it right, that I took the time, and spent a bunch of days working on it.

At first, I was a little bit disappointed that something so basic was not included in the game engine. So I browsed the asset store and tried a few assets with no success.

The problem, kin of “as usual” is that I want something very specific with a certain feel to it, and even if most of the assets were configurable I never found the right combination. I decided to give it a try myself.

I’m a little torn, in a way it was not so hard to do, but on the other, I had to deal with so many cases. As you may know from my article on my technological choices I decided to handle most of the physics myself. So that was some work to get the character to collide with stuff and bounce when projected.

But it’s done.

  • I implemented left / right move
  • Jump (and double jump) in player physics controller
  • Handled pretty much all collision cases, including when hitting multiple walls at the same time (or when falling, jumping)
  • Implemented distance limits (because in Artillery Royale, a character can move a certain distance regarding his class. Not sure that mechanic will make it up to the final version).