summaryrefslogtreecommitdiff
path: root/platformer/game_feel.md
diff options
context:
space:
mode:
authorSchark <jordan@schark.online>2026-09-29 23:36:45 -0400
committerSchark <jordan@schark.online>2026-09-29 23:36:45 -0400
commit8af1210d45c3fa3f41a174d2906ab597dcc22f1c (patch)
tree43f1a9814faae852af943f71de53d4ca38dc6cd2 /platformer/game_feel.md
parentfdc8c951fc72d9dc4c8faa58a21b2b9de0599698 (diff)
downloadgamedev-8af1210d45c3fa3f41a174d2906ab597dcc22f1c.tar.gz
gamedev-8af1210d45c3fa3f41a174d2906ab597dcc22f1c.zip
Final state of the game day 3HEADmaster
Diffstat (limited to 'platformer/game_feel.md')
-rw-r--r--platformer/game_feel.md58
1 files changed, 50 insertions, 8 deletions
diff --git a/platformer/game_feel.md b/platformer/game_feel.md
index 602ded0..68d650f 100644
--- a/platformer/game_feel.md
+++ b/platformer/game_feel.md
@@ -123,11 +123,12 @@ and eased, not snappier.
(`heightened_movement`, 0.2 s), so skid → retreat jump → second jump chains. `heightened_movement` is
also on for the whole retreat jump, so it can grab a wall.
- **`heightened_movement` rules, all in one place.** It's on during the second jump, retreat jump,
- every wall jump and every wall hang, and for a 0.2 s window after landing a normal or retreat jump
- (the window only counts down while not in a jump). It is **not** on during a plain first jump, so a
+ every wall jump and every wall hang, and for a 0.2 s window after **any landing except the second
+ jump's**: a normal or retreat jump, or a plain fall (walking off a platform, letting go of a wall), so
+ walking off a ledge sets up a second jump. The window only counts down while not in a jump. It is **not** on during a plain first jump, so a
single jump can't grab a wall. **We tried it the other way:** players expected to wall hang off one
jump, but it made wall hangs too strong, so it was reverted. It turns off when the window runs out,
- when landing a second jump or plain fall, or when a wall hang runs out. On the ground it means "A
+ when landing a second jump, or when a wall hang runs out. On the ground it means "A
gives the second jump"; in the air it means "can wall hang".
- **The wall hang (`WALL_HANG`).** Grabbing a wall needs all of these: `heightened_movement` is on,
the player is in the air (JUMP or FALL), they hit the side of a box with `allows_wall_hang`, and
@@ -234,6 +235,18 @@ keep this model or you'll lose several properties below at once.
otherwise look like a 100 m sprint.
- **Floor guard:** the eye never drops below `CAMERA_MIN_HEIGHT` (0.5 m) above the player's feet, so it
stays out of the floor at low pitch.
+- **The camera never goes INTO objects** (solid boxes; zones never count). Objects **between** the
+ player and the camera are fine: a platform in the shot stays in the shot (checked: a cliff strip in
+ the line of sight leaves the camera at its full 10 m). Only when the spot the eye wants is **inside**
+ an object does the eye **jump through it at once** to its near side, along the line to the player
+ (so the player stays on the same screen spot). When the spot is free again, it **eases back out**,
+ the same speed-up, cruise, brake style as the auto-tilt (`CAMERA_RETURN_ACCEL` 3 m/s²,
+ `CAMERA_RETURN_SPEED` 3 m/s; doubled from 1.5 / 1.5 after feedback; a 6 m return takes ~3.0 s).
+ If that way out would pass into an object, it jumps through to the far side instead of stopping
+ inside. **History:** the first version also pulled in whenever an object merely blocked the line
+ of sight; the user wanted objects in view to stay in view. Measured: the wanted spot inside the
+ far cliff puts the eye at the cliff's face (0.25 m off it), and in 10 s of orbiting the eye was
+ never inside an object.
### Manual camera control
@@ -259,6 +272,10 @@ New automatic camera behaviors should follow the same approach: slow, eased, and
## Level and collision
+**Terms:** *objects* are solid gameworld boxes (platforms, cliffs, pillars, walls, moving platforms).
+*Zones* are non-solid regions where an effect applies (locked-pan). Even though zones are box-shaped,
+they are not objects, and nothing collides with them.
+
> **Platform size rule: platforms are ~5 m across at minimum.** Only the most extreme challenges
> (or secrets) go smaller. **Why:** the player is heavy. Starts build up, stops skid for half a
> second, and a normal jump lands with momentum. At this size or larger, the player feels they have
@@ -336,8 +353,7 @@ New automatic camera behaviors should follow the same approach: slow, eased, and
the face are singles, so they can't grab the face on an overshoot.
- **The river** is 13 overlapping water tiles (`BOX_STYLE_WATER`, a solid 5 cm sheet, no swimming)
along the diagonal, parallel to the third side.
- - **Known rough edges:** there's no camera collision, so the camera passes into the cliff and
- through platforms (it's even more noticeable here). A fall from the top is a 55 m drop with no
+ - **Known rough edges:** a fall from the top is a 55 m drop with no
damage, and Back resets. Jumping off a moving platform doesn't keep its momentum (SM64 mostly
doesn't either). Changing the seed gives a new climb; re-run the course test if you do, or after
changing movement numbers.
@@ -356,6 +372,28 @@ New automatic camera behaviors should follow the same approach: slow, eased, and
- The floor check uses the height *before* the move, so even a terminal-velocity fall can't tunnel
through a 0.5 m slab.
- Jumping into an underside bonks.
+ - **Stairs: ledges under `STEP_HEIGHT` (0.25 m, raised from 0.2) are walked, not jumped.** On the ground, walking into
+ an object whose top is less than 0.2 m above the feet (with room up there) lifts the body onto it.
+ Walking off one onto a floor less than 0.2 m below snaps down to it. The body never leaves the
+ ground, so there's **no FALL state and no landing, and so no `heightened_movement` window**. Taller
+ drops still fall normally. Test staircases, east of spawn: **stairwell 1**, 40 steps of 0.2 m × 0.5 m
+ (20 m long, 8 m tall, z −2..2); **stairwell 2**, 100 steps of 0.2 m × **0.12 m** (12 m long, 20 m
+ tall, z 4..8). **Minimum stair depth ≈ one tick of travel:** the step logic handles one stair per
+ tick, and the fastest the player moves is 7 m/s ÷ 60 = 0.117 m, so shallower steps get crossed two
+ at a time and block the climb. Tested: 0.05 and 0.08 m can't be climbed, 0.10 m fails running
+ down at 7 m/s, and 0.11 m and up work. (Sub-stepping the horizontal move would lift this limit;
+ not done.) Measured: up in 3.9 s and down in 4.1 s at full 6 m/s, with 0 ticks in FALL, 0 off
+ the ground, and 0 heightened either way. Jumping on a stair still jumps.
+ - **Stairs look smooth without being ramps.** Physics still steps the body a whole stair in one
+ tick (collision and timing stay exact), but it reports each step (`Body.step_dy`). The player
+ keeps a `visual_offset` that cancels the step and glides back to 0 at `STEP_SMOOTH_RATE`
+ (14 /s). `player_visual_pos()` is where the box is **drawn** and what the **camera follows**;
+ gameplay, the shadow and zones use the real position. This works on any ledge under 0.2 m, not
+ just the test stairs, and real jumps and landings are never smoothed. Measured climbing at 6 m/s:
+ per-tick height unevenness goes from 0.060 m (raw) to 0.010 m drawn and 0.009 m for the camera,
+ and the biggest one-tick change from 0.15 m to 0.045 m. The drawn body lags the real height by up
+ to 0.17 m (about one stair). Lower the rate for smoother (8 → 0.006 m, but a 0.27 m lag) or raise
+ it for tighter (18 → 0.0125 m, 0.14 m lag).
- Every push out of a box's side sets `Body.hit_wall`, the side's `wall_normal` and its `wall` box.
That's how the wall hang knows what it touched. `Body.gravity_scale` (normally 1) lets the
player switch gravity off while it drives its own wall slide.
@@ -387,9 +425,8 @@ New automatic camera behaviors should follow the same approach: slow, eased, and
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).
-- **Rough edges not yet addressed:** there's no step-up (even a 0.6 m block needs a jump);
- `forward_speed` isn't reduced by walls (the title shows 6 m/s while pushing into one); the drawn
+- **Rough edges not yet addressed:** ledges of 0.2 m or more still need a jump (by design; stairs
+ under 0.2 m are walked); `forward_speed` isn't reduced by walls (the title shows 6 m/s while pushing into one); the drawn
box rotates but the collision box doesn't (up to about 17 cm visual overlap with walls at
diagonals).
@@ -428,6 +465,11 @@ New automatic camera behaviors should follow the same approach: slow, eased, and
| Skid pull-back angle | 120° → 130° (must pull more squarely back) | 130° |
| First jump heightened (revert) | on → off again (wall hangs off one jump were too strong); clear-the-top rule kept | off |
| Cliff course platforms | 3–4.5 m → 4–6 m, 1.5–13 m out from the face, heights on a 1.5 m tier grid, no back-to-back doubles, far cliff 60 → 58 m | 39 |
+| Second-jump window from falls | walking off an edge closed it → any landing but the second jump's opens it | on |
+| Step height | none (any ledge needed a jump) → ledges under 0.2 m walked up/down, no fall → 0.25 m | 0.25 m |
+| Stair smoothing | none (visual pop per step) → drawn/camera height glides at 14 /s | 14 /s |
+| Camera vs. objects | passes through → snaps in front of any object in the line of sight → only when the eye would be INSIDE one (objects in view stay in view); eases back out at 1.5 → 3 m/s (accel 1.5 → 3) | 3 m/s |
+| Locked-pan zones | none → one box round the cliff (ground to the 55 m top): no auto swing inside | 1 zone |
| 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 |