I’m working on a platformer (Really thanks to SkyAphid’s question earlier about randomly generated Platform dungeons xD), and I’m currently working on player control/physics. While enemies will be able to “select” their jumping velocity (Within some bounds), I’m having trouble deciding how I want to do this for the player.
Basically the plan is to make it so that the player can have their character jump a “variable” height, depending on how long they keep the jump key pressed down. Meaning, they can ‘tap’ for a little jump. Press-and-hold for a larger one. Perhaps even having something like a Press-and-hold until you reach the height you wanted (Within the jump-height limit).
The main issue that I’m having here is that all of these options mess up the idea of the parabolic arch that a jumping character should follow (Not to mention the whole “I can still move left and right while falling” thing a lot of games are based one). Starting from the ‘tap’, the character will be given an upward velocity, which is then acted on by gravity to bring them back down. For the other options, it causes an odd skewing of the arch due to not having the “right” initial velocity and having to correct it for each logic step where the jump key is still pressed down.
I was wondering if anyone has some advice on this issue, whether it’s just bite the bullet and eat the odd parabolic arch or some insight on how it’s been done in other games.