Spielerando

Jumping in a low cave tunnel without getting stuck in the ceiling

In caves and player-built bunkers the ceiling is often lower than the character is tall. Pressing jump there makes the character stand up through the roof, bonk every frame or buzz up and down. Here is how to decide whether to stand, how high a hop is still possible, and when to say no.

Why this works

The body must ask what it can do under this ceiling before it moves, not after. Planning the jump from the free space above the head means no bumping, no sticking and no jump that begins inside stone.

When not to use it

Skip it when tunnels are all one fixed height; a single rule for that height is simpler. And wrong where the player should be allowed to hit the ceiling for a cost, such as a game about careless cave exploration.

In the full entry

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

Say this to your AI

Use the Spielerando entry "Jumping in a low cave tunnel without getting stuck in the ceiling" (read_entry jump-inside-a-low-tunnel-or-crawlspace) 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