Spielerando

Set a jump by how high and how long it should be, not by guessing numbers

Tweaking gravity and jump strength by trial and error ends with jumps that are floaty on the way up and heavy on the way down, or that no longer fit your level. Here is how to start from what you want and get the numbers out.

Why this works

A level is built from how far and how high the hero reaches, so the jump should be defined by those, and the physics worked out from them. Then changing one goal moves the numbers together and no gap you built breaks by accident.

When not to use it

Skip it when the jump should come from a feeling you tune by hand, or when the character's weight changes during play, such as when carrying things or swimming. Then adjust by testing with players, and keep a few reference jumps to compare against.

In the full entry

  • What to build, step by step
  • Starting values and the reason for each
  • 3 common mistakes and the fix
  • 36 lines of example code with 3 checks that pass
  • How your AI shows you that it works

Say this to your AI

Use the Spielerando entry "Set a jump by how high and how long it should be, not by guessing numbers" (read_entry jump-height-and-airtime-to-gravity) in my game. Build it step by step, and show me how you checked that it works.

Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP