• Register
Post news Report RSS Improving the Jump in NGJ

We write about how we chose to improve the jumping in Neko Ghost, Jump!

Posted by on

The Problem

So we were never really satisfied with how jumping was in the game, and it was even more apparent when players gave us basically the same feedback (jumping felt off or not as responsive as they expected)

I looked around the good old internet about the subject (why reinvent the wheel right?) and found some interesting topics on the matter, especially from Kyle “Kpulv” Pulver

It seemed basically what others were doing.

We were using Unreal Engine 4’s basic Jump function:

Docs.unrealengine.com

Docs.unrealengine.com

And as with most of UE4’s default functions, they made it generic enough to be used in almost any genre (but most definitely derived from their FPS roots). In a game like ours we need a little bit more custom logic.

Here are some videos showcasing the issues:



Here's the level again:

HighresScreenshot00050


Collisions:

HighresScreenshot00051


JumpCollision


In the last screenshot, you can clearly see the player hanging off the edge with no "ground" underneath due to the capsule collision for the character and geometry collision. This actually means the player can't jump normally.

The solution

So you remember how we read all those articles on the internet and they all said pretty much the same thing and I wasn't going to reinvent the wheel...well, that didn't happen. However, this is not actually the final iteration we will be doing on jumping.

Instead of the input buffer or jumpgrace timer, I decided to see if I could do it simply by doing line traces around the bottom of the character to see if there was any ground to jump on. Specifically, I did three line traces (but the more I try to break it, I might go up to five next, two more in between).

What does this accomplish? Well, actually basically the same thing and a little more. Let's watch the video first:


Before, if you hit the edge of a platform from the front, there was no way you'd be able to do save yourself, basically it felt kinda crappy. Even with jump input buffer or grace period timers, you'd never be able to do that.

Also, if you pay attention to the videos, with the improved jump it’s much easier to chain jumps together.

So now, when jump is pressed, three line traces shoot out from under the character (simple float variable can extend the range, so easy to tweak) and we can give the players a little bit of leeway in regards to jumping.

Also, we use Launch Character instead of Jump but basically use the same settings from Character Movement Component.

AreWeCloseEnoughToGround


NewJump


What's Next?

I"m going to add two more line traces in between, and also going to try out a grace period for "ledge forgiveness" after all, that should take care of all variables.

Then push out the next version of the demo.

P.S.

I only showed the 2D perspective since it's easier to gauge if things are better. It's just as good in 3D perspective as well. It's actually pretty satisfying chaining jumps all over the place. Also, I did allow a bit more air control so that's cool.

If you like what you see, join our newletter on our website where more subscriber-only tips and tricks happen. Also, our Discord is always open and we're still looking for beta testers for the full game.

Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: