AI game generator · Jump input
Why Does My Game Ignore Jump Input Just Before Landing?
Log the input tick and landing tick before changing jump height
If a player presses jump just before touching the floor, the input may be outside your game’s accepted timing window, or it may be stored and cleared at the wrong moment. Record the input tick, the landing tick, the grounded state, and whether a buffered press was consumed. A jump-height setting cannot repair an input that was never accepted.
Use one short test scene with the same player speed, gravity, floor and jump action. Compare a press a few ticks before landing with a press after landing. The useful question is whether the input reaches the landing transition, not whether the jump animation looks tall enough.
Separate four timing failures
Press before landing, no buffer: the input is read while the player is still airborne and is discarded before the grounded transition. The player can land correctly and still never jump.
Press inside a buffer: the input is retained until the landing transition, then consumed once. This is the intended behavior when the design calls for forgiving controls.
Press after landing: this is a useful control case. If it works while the earlier press fails, compare the input lifetime and the order of grounded-state updates.
Stale buffer: a stored press can survive too long and trigger on a later landing. Clear it after consumption or expiry, and record the exact tick at which it was cleared.
Godot’s Input reference describes checking an action press during the current frame or physics tick. Its CharacterBody2D reference documents movement and floor state separately. These references support inspecting the order of checks in a Godot project; they do not show what engine a commercial AI game generator uses.
Trace one landing with supplied ticks
We wrote a small Node model with a landing at tick 100 and a three-tick buffer. The predicate accepts a press only when its tick is 97, 98, or 99; it does not accept a press after landing, or one that is older than the buffer.
A press at tick 98 is inside the window, so the model reports that it can be consumed at landing. A press at tick 101 is a post-landing control case and is not treated as a buffered pre-landing press. A press at tick 95 is too old. A press at tick 96 is also outside the three-tick window; it demonstrates why an apparently tiny timing difference needs an explicit log.
| Supplied case | Landing tick | Input tick | Buffer | Model result |
|---|---|---|---|---|
| Before landing | 100 | 98 | 3 ticks | Accept |
| After landing | 100 | 101 | 3 ticks | Do not consume as buffer |
| Missed window | 100 | 95 | 3 ticks | Reject |
| Stale buffer | 100 | 96 | 3 ticks | Reject |
This is an illustrative tick predicate, not a physics solver. It contains no gravity, animation, input device, collision shape, frame-rate conversion, or engine integration. Use it as a worksheet for your own logs, then verify the actual exported build.
For a concrete debugging record, write one row per physics tick: tick 95 has no press, tick 96 has a stale press, tick 97 enters the accepted window, tick 98 remains eligible, tick 99 is the last eligible tick, and tick 100 changes the grounded state. The row at tick 98 should say whether the press is stored; the row at tick 100 should say whether it is consumed. This makes “the jump was ignored” a sequence that can be compared with a successful landing.
The model also gives a safe boundary for a repair request. If the input tick is 98 and the landing tick is 100, changing jump force is unrelated to the predicate. If the input is 95, extending the buffer from three ticks to five is a deliberate control change, not a proof that the old value was broken. If a later landing consumes the old press, the clear event is missing. These are different edits and should be replayed separately.
To keep the comparison honest, hold the tick source constant. Do not compare a render-frame timestamp with a fixed-physics tick and call the difference a buffer failure. Record whether the press was sampled in the input callback, copied into gameplay state, and read by the movement step. A missing copy can look identical to an expired buffer from the outside, while the repair belongs in a different part of the loop.
One useful paired run contains six rows before and after the change. In the first run, the press at 98 is stored and then discarded at 100; in the second, it is stored at 98 and consumed at 100. The player, floor, gravity and animation remain unchanged. If the two logs differ before the landing row, the change affected input ownership. If they differ only after the landing row, inspect the jump transition. This supplied comparison does not predict how any engine resolves a collision; it only makes the timing claim testable.
Write the expected result beside each row before running the build. The expected result for tick 98 is “eligible,” not “jump happened,” because consumption still depends on the landing transition. The expected result for tick 101 is “new press,” not “old buffer,” because it belongs to a different state. This naming prevents a successful later jump from hiding a failed pre-landing handoff.
Finally, repeat the same six rows after a restart. A buffer that belongs to the previous round must not appear in the new round’s first landing. Keeping the round identifier beside the tick makes that boundary visible. These checks are small enough to run on every generated revision and precise enough to tell whether the fix changed input timing or changed the movement simulation.
Use a repeatable landing test
- Log the current physics tick, grounded state and jump input state every update around one landing.
- Press jump three ticks before landing, then repeat one tick before and one tick after landing.
- Record when the input is stored, consumed and cleared. Keep the player speed and floor unchanged.
- Run the same sequence after restarting the exported build so an old buffer cannot survive between rounds.
- Change only the buffer lifetime or the order of the grounded check, then replay all three controls.
Do not raise jump force first. If the post-landing control works but the pre-landing control fails, inspect the timing window and state transition. If both fail, check the action binding and the movement owner before tuning feel.
Ask the generator to diagnose one landing
Keep player speed, gravity, floor geometry and jump height unchanged. Log the physics tick, grounded state, jump press, buffer expiry, and consumption point for one landing. Compare a press three ticks before landing, one tick before landing, and one tick after landing. Change only the input buffer lifetime or the order of the grounded check, then replay the same exported build. Clear the buffer after consumption and on restart.
Questions to check before tuning jump feel
Should a jump press just before landing count?
Only if the intended control design includes a pre-landing buffer. Decide the window first, then test its expiry and consumption.
What if the jump triggers one landing late?
Log the buffer’s clear tick. A value that survives past its intended landing can be consumed by a later grounded transition.
What if jump works after landing but never before it?
Compare the input and grounded checks in the same tick. The earlier press may be discarded before the floor state becomes true.
Review the collision-aware movement checklist if the landing itself is unreliable, and keep input-gated behaviors separate when debugging another action.
Watch the jump-input timing explanation alongside this checklist.