summaryrefslogtreecommitdiff
path: root/platformer/game_feel.md
diff options
context:
space:
mode:
authorSchark <jordan@schark.online>2026-09-29 18:46:53 -0400
committerSchark <jordan@schark.online>2026-09-29 18:46:53 -0400
commit923b5928eeafd9bf969b95c4d49699d280b1ce0f (patch)
tree0210db826b4cbdfc91704dc6655652b96cbd36b4 /platformer/game_feel.md
parent25992eb0baa1be5b49e8732e4b63734cdafe3b80 (diff)
downloadgamedev-923b5928eeafd9bf969b95c4d49699d280b1ce0f.tar.gz
gamedev-923b5928eeafd9bf969b95c4d49699d280b1ce0f.zip
Double jump foundation
Diffstat (limited to 'platformer/game_feel.md')
-rw-r--r--platformer/game_feel.md30
1 files changed, 28 insertions, 2 deletions
diff --git a/platformer/game_feel.md b/platformer/game_feel.md
index 166d476..c6c8201 100644
--- a/platformer/game_feel.md
+++ b/platformer/game_feel.md
@@ -68,6 +68,26 @@ and eased, not snappier.
is the continuous-physics figure) and a tap gives about 0.72 m. Level geometry is sized against 2.33 m.
- **A jump pressed on the landing tick is never lost.** The FALL state hands off to the ground
logic on the same tick it detects landing.
+- **The second jump (SM64's double jump).** Landing any first jump, hop or full, turns on
+ `heightened_movement` for `PLAYER_SECOND_JUMP_WINDOW` (0.3 s, 18 ticks counting the landing tick).
+ Pressing A while it's on launches at `PLAYER_SECOND_JUMP_VELOCITY` (18.41 m/s): a full second jump
+ reaches **4.08 m** (1.75× the first, measured at 60 Hz, 54 ticks of airtime), and tapping A gives
+ about 1.4 m. `heightened_movement` stays on for the whole second jump, whatever its length, and turns
+ off when it lands, so the second jump can't chain into another.
+- **The second jump trades speed for height.** Until it lands, the top speed is
+ `PLAYER_SECOND_JUMP_MAX_SPEED` (5 m/s) instead of 6. Taking off at a full run bleeds the extra
+ speed off gradually at `PLAYER_SECOND_JUMP_SLOWDOWN` (3.5 m/s²), reaching 5 m/s after 19 ticks (0.32 s)
+ of the 0.90 s jump. While the player is over the cap, the stick only turns them; the bleed happens
+ whatever the stick does. A full-speed second jump covers about 4.8 m (it was 5.4 m uncapped).
+ **Don't bleed at `PLAYER_AIR_ACCEL`:** the first version did (6 → 4 m/s in 0.25 s), and it felt like
+ hitting a wall of syrup right at takeoff. After landing, normal ground accel brings 6 m/s back in about 0.23 s. There's
+ no extra state for this: `jump_number == 2` already means "in the second jump", and `top_speed()`
+ in `player.c` reads it. Walking off an edge and landing
+ also turns it off. A press on the landing tick already counts.
+- **`heightened_movement` is a named player state on purpose.** It's a field on `Player`, separate
+ from the IDLE/RUN/JUMP/FALL action, because later moves are meant to key off it. The title bar
+ shows `| heightened` while it's on (the title refreshes every 0.25 s, so the 0.3 s window may
+ blink briefly or not show at all; the second jump itself always shows it).
- **SM64-style circling is intentional.** Controls stay purely camera-relative even while the camera
swings on its own, so holding the stick sideways during a camera swing makes the player run a
wide arc (about 12 m radius, 24 m across, at 6 m/s). The user explicitly chose this over locking the stick direction.
@@ -157,7 +177,8 @@ New automatic camera behaviors should follow the same approach: slow, eased, and
- **The level is a test space**, like SM64's pre-level sandbox: flat ground plus 40 seeded-random box
platforms (`WORLD_SEED`, so every run is the same layout). Spawn is kept clear (4 m).
- **Heights are sized to the jump:** ground blocks top out at 2.0 m (below the 2.33 m jump); floating
- slabs sit at 2.6–4.2 m, reached by jumping from a block. Only 9 of 16 floating slabs have a block close
+ slabs sit at 2.6–4.2 m, reached by jumping from a block. The 4.08 m second jump can reach 14 of
+ the 16 slabs straight from the ground; the two with tops at 4.11 m and 4.17 m still need a block. Only 9 of 16 floating slabs have a block close
enough to jump from; reachability isn't guaranteed yet. That count was made at a 9 m/s run. At 6 m/s a
full running jump covers only about 4.0 m horizontally (it was about 6 m), so fewer slabs may be
reachable now.
@@ -179,7 +200,8 @@ New automatic camera behaviors should follow the same approach: slow, eased, and
- **The camera tracks every full jump vertically.** The running bound's vertical span (0.22 of the
window) is smaller than a full jump on screen (about 0.38), so the camera rises and falls with each
jump. SM64's approach, framing vertically against the ground under the player rather than their
- airborne height, was offered but not yet decided.
+ airborne height, was offered but not yet decided. The 4.08 m second jump makes this 1.75× as
+ noticeable.
- **Holding sideways never reaches the back quarter.** With circling, the player's "right" turns
with the camera, so the swing chases forever. It only settles when the player steers to hold a line.
- **The starting pitch (20°) differs from the auto-tilt target (15°),** so every session begins with a
@@ -216,6 +238,10 @@ New automatic camera behaviors should follow the same approach: slow, eased, and
| Ground accel | 30 → 12 → 7 → 8.4 m/s² (0.30 → 0.60 → 0.72 s to top speed; the last step kept 0.72 s at 6 m/s) | 8.4 m/s² |
| Ground friction | 40 → 16 → 9.5 → 11.3 m/s² (0.23 → 0.45 → 0.53 s stop; the last step kept 0.53 s at 6 m/s) | 11.3 m/s² |
| Air accel | 30% of ground accel → its own constant, value kept | 9 m/s² |
+| Second jump height | 2× (19.66 m/s) → 1.75× (18.41 m/s), sets `heightened_movement` | 18.41 m/s |
+| Second jump window | 0.5 s → 0.3 s after landing | 0.3 s |
+| Second jump top speed | 6 m/s (same as running) → 4 → 5 m/s until it lands (4 felt a tad harsh) | 5 m/s |
+| Second jump slowdown | air accel 9 m/s² (0.25 s, "wall of syrup") → own rate 3.5 m/s² (0.60 s) | 3.5 m/s² |
| Standstill turn | turn rate → instant at speed 0 → instant only past 90° (ground only) | > 90° instant |
---