summaryrefslogtreecommitdiff
path: root/platformer/game_feel.md
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--platformer/game_feel.md50
1 files changed, 38 insertions, 12 deletions
diff --git a/platformer/game_feel.md b/platformer/game_feel.md
index c6c8201..e6862a8 100644
--- a/platformer/game_feel.md
+++ b/platformer/game_feel.md
@@ -68,8 +68,8 @@ 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).
+- **The second jump (SM64's double jump).** Landing any first jump (hop or full) or a retreat jump
+ turns on `heightened_movement` for `PLAYER_SECOND_JUMP_WINDOW` (0.2 s, 12 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
@@ -84,10 +84,34 @@ and eased, not snappier.
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).
+- **The skid (SM64's turnaround skid).** At full run and above (at least 95% of `PLAYER_MAX_SPEED`,
+ `PLAYER_SKID_SPEED_FRACTION`, so faster future moves count too), pulling the stick more than 120°
+ (`PLAYER_SKID_ANGLE_DEG`) off the run direction enters the `SKID` state. The player **faces the stick at once**
+ (and keeps tracking it) while still sliding the old way (`skid_yaw`), so they're turned around and
+ sliding backward. There's no steering. The skid always lasts `PLAYER_SKID_DURATION` (0.5 s, 30 ticks)
+ and ends stopped, with speed following `start × (1 − (t / 0.5)^PLAYER_SKID_GLIDE_POWER)`. At power 2
+ (**glide, then plant**), braking starts near zero and builds: from 6 m/s the speed is 5.76 / 5.04 /
+ 3.84 / 2.16 m/s at 0.1 / 0.2 / 0.3 / 0.4 s, the slide covers 1.95 m, and braking peaks at about 24 m/s²
+ right at the end. A higher power glides longer and plants harder, and 1 is even braking.
+ `retreating_movement` is on for the whole skid. Pushing sideways (90°) never skids. Sliding off an
+ edge ends the skid and keeps the slide's direction in the air.
+ **History:** the first skid braked evenly at 18 m/s² (0.33 s) and turned only at the end. The user
+ wanted it longer, gentler at first ("a short slide rather than a fast turnaround"), and facing the
+ stick immediately.
+- **The retreat jump (like SM64's side flip).** Pressing A at any point during the skid launches the player
+ the way they already face (toward the stick, or where it last pointed if it was let go) at `PLAYER_RETREAT_JUMP_SPEED` (4 m/s)
+ in that direction, which is also its top speed until landing. It uses `PLAYER_RETREAT_JUMP_VELOCITY`
+ (19.66 m/s): a full retreat jump reaches **4.67 m** (2.00× the first jump, the highest jump), with
+ 59 ticks of airtime and about 3.9 m of travel; a tap gives about 1.4 m. `retreating_movement` stays
+ on through the jump and turns off on landing. Landing it **does** open the second-jump window
+ (`heightened_movement`, 0.2 s), so skid → retreat jump → second jump chains.
+- **`heightened_movement` and `retreating_movement` are named player states on purpose.** They're
+ fields on `Player`, separate from the IDLE/RUN/SKID/JUMP/FALL action, because later moves are meant
+ to key off them. Which jump the player is in is `jump_kind` (`JUMP_NORMAL`, `JUMP_SECOND`,
+ `JUMP_RETREAT`); the jumps share the `JUMP` action. The title bar
+ shows `| heightened` / `| retreating` while they're on (the title refreshes every 0.25 s, so the
+ 0.2 s window may blink briefly or not show at all; the jumps themselves always show
+ it). The skid also shows as `SKID` in the state slot.
- **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.
@@ -206,11 +230,10 @@ New automatic camera behaviors should follow the same approach: slow, eased, and
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
small upward tilt. Setting `CAMERA_PITCH_DEFAULT` to 0.26 rad would skip it.
-- **Heavy stops, but not heavy reversals.** Letting go skids, yet pushing the stick the opposite way
- at full speed keeps all the speed and swings around in a tight 0.26 s U-turn, since velocity always
- points along the facing direction. SM64 solves this with a turnaround skid (brake, then turn). That's
- listed under `NOT IN SCOPE` in `player.c` for now, but it's the natural next step if reversals feel
- too light next to the stops.
+- **Reversals below full run are still light.** At full run, pulling back skids (see the skid
+ section). Below 95% of top speed, pulling back still swings around in a tight 0.26 s U-turn with all
+ the speed kept, since velocity always points along the facing direction. Extending the skid to
+ slower runs is listed under `NOT IN SCOPE` in `player.c`.
- **High-angle auto-tilt resets are long** (60° → 15° takes about 15.7 s of motion). For big tilts the
top speed (`CAMERA_AUTO_PITCH_SPEED`) sets the time; for small ones, the acceleration does.
- **No camera collision:** the camera can pass through tall platforms (it's on the roadmap).
@@ -239,9 +262,12 @@ New automatic camera behaviors should follow the same approach: slow, eased, and
| 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 window | 0.5 s → 0.3 s → 0.2 s after landing | 0.2 s |
+| Second jump from | normal jump landings → also retreat jump landings | both |
| 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² |
+| Skid | none (full-speed U-turn) → 18 m/s² even braking, turn at the end (0.33 s) → face the stick at once, glide-then-plant curve (power 2) | 0.5 s |
+| Retreat jump | added: 2× height, launched at 4 m/s toward the stick, sets `retreating_movement` | 19.66 m/s |
| Standstill turn | turn rate → instant at speed 0 → instant only past 90° (ground only) | > 90° instant |
---