Click.
Bam!
BOOM💥
START
Adjust the sliders to perfectly tune your jump curve.

Engine Output Vectors

Gravity: 0.0 units/s²
Jump Velocity: 0.0 units/s

Designer Targets

Controls the width of the visual arc.

Code Snippet

The Secret to Perfect Platformer Controls

If you've ever played a platformer game where the jumping felt "floaty" or "mushy", it's usually because the developer manually guessed the Gravity variable. Gravity in game engines is arbitrary; a scale of `1.0` in Unity has absolutely nothing to do with gravity acting on Mario in a 2D grid.

The smartest game designers (like the creators of Celeste and Hollow Knight) use Inverse Kinematics. Instead of guessing numerical physics variables, they determine their Level Design constraints first. For example: "I want the player to be able to jump exactly 4 tiles high, and I want the jump to feel extremely snappy, taking exactly 0.35 seconds to reach the peak."

The Mathematics

Using standard Newtonian kinematic equations, we can simply algebraically reverse the formula. We plug our two designer constraints (Height and Time) directly into the equation to calculate the specific magical Gravity number that satisfies both conditions perfectly:

Gravity = (2 * JumpHeight) / (TimeToApex * TimeToApex)
InitialVelocity = Gravity * TimeToApex

Now, anytime the protagonist hits the Jump button, you apply `InitialVelocity` upwards, and let your custom `Gravity` pull them smoothly back down to earth, guaranteeing they will crest accurately at 4 tiles high.

Answers to Common Developer Questions

How do you calculate Gravity for a 2D Platformer Jump?
Instead of guessing arbitrary gravity values, you can use Inverse Kinematics. If you know exactly how high you want the player to jump (h), and exactly how long it should take to reach that peak (t), the formula for Gravity is: `g = (2 * h) / (t * t)`.
How do you calculate Initial Jump Velocity in games?
Once you have mathematically calculated your required Gravity scalar based on your desired jump height and time-to-apex, your Initial Jump Velocity is simply: `Velocity = Gravity * TimeToApex`. You apply this instantaneous vertical force the moment the jump button is pressed.
How do you predict how far a player can jump?
The total horizontal distance a player can clear is dictated by their constant walking speed multiplied by their total time in the air. Total air time is simply twice the Time-to-Apex (assuming the ground is level). Therefore: `MaxDistance = WalkSpeed * (TimeToApex * 2)`.