It’s simple enough to make a very basic jump. When you press jump, you go up at a certain speed, and while in the air you accelerate downwards. I figured it should be easy enough…

Well, that’s definitely not what I’m looking for, this jump is the tofu of jumps (tofu is a vegetable that is unable to control its vertical speed). You have no control of how high you jump and it just doesn’t feel satisfying. I figured I could give the player control of their jump by cancelling your upwards movement when you release jump.

While this is able to control its vertical momentum, this feels almost aggressively awkward to control.It looks like your character is hitting his head on some invisible ceiling. So what if instead of canceling vertical speed I just set it to a lower value. I decided to try halving the vertical speed once space is released. This makes you slow after releasing jump, instead of stopping completely.

Now that looks nice, and you can control how high you can jump. But I think it needs to feel more punchy. Right now I think it seems like you’re a piece of paper blown up in the wind. I still want to fall (somewhat) slowly after the peak of my jump, but I don’t want the ascension to feel floaty as well. My idea is to increase gravity when you first jump, and decrease gravity slowly afterwards.

Now your character feels more solid and I’m finally feeling satisfied with the jump. Next I added a simple “ghost jump”, which means that a few frames after you walk off a cliff you can still jump. This is in most platformers and it ensures that the player doesn’t feel cheated by not jumping after leaving ground.

This means whenever I try to jump it checks if I’m on land and also if I was on land recently. However this created a problem. If I jump then press jump again in a few frames it will jump again. So double tapping jump will add your jumps together and go higher. This is because it checks and finds that I was on land recently and jumps again after already jumping.

That’s weird. I should probably remove this glitched double jump thing. Or maybe not, even though it was unintended it isn’t necessarily bad. Most players will never discover it, and it adds an extra layer of skill for speedrunners because it’s quite difficult to pull off. What do you think? Should I keep it?