From 25992eb0baa1be5b49e8732e4b63734cdafe3b80 Mon Sep 17 00:00:00 2001 From: Schark Date: Tue, 29 Sep 2026 18:26:32 -0400 Subject: Small inertia and movement tweaks --- platformer/src/config.h | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'platformer/src/config.h') diff --git a/platformer/src/config.h b/platformer/src/config.h index 346b2b8..8816e98 100644 --- a/platformer/src/config.h +++ b/platformer/src/config.h @@ -35,13 +35,18 @@ * become exactly that direction) * * Player: ground movement - * PLAYER_MAX_SPEED 9.0f m/s at full stick tilt - * PLAYER_GROUND_ACCEL 30.0f m/s^2 speeding up toward target speed - * PLAYER_GROUND_FRICTION 40.0f m/s^2 slowing down with no input + * PLAYER_MAX_SPEED 6.0f m/s at full stick tilt (kept modest on purpose: + * later moves will be the way to go faster) + * PLAYER_GROUND_ACCEL 8.4f m/s^2 speeding up toward target speed + * PLAYER_GROUND_FRICTION 11.3f m/s^2 slowing down with no input (a short skid) * PLAYER_TURN_RATE 12.0f rad/s max facing rotation on ground + * PLAYER_SNAP_TURN_DEG 90.0f degrees; from a standstill, stick pushes + * more than this away from facing turn + * instantly (smaller ones use the turn rate) * * Player: air movement - * PLAYER_AIR_CONTROL 0.30f 0..1 multiplier on accel + turn rate in air + * PLAYER_AIR_CONTROL 0.30f 0..1 multiplier on turn rate in air + * PLAYER_AIR_ACCEL 9.0f m/s^2 speeding up toward target speed in air * PLAYER_JUMP_VELOCITY 14.0f m/s upward at jump start (~2.4 m apex) * PLAYER_JUMP_CUT 0.50f vel.y multiplier when A released while rising * @@ -130,13 +135,15 @@ #define LOOK_AXIS_SNAP_DEG 15.0f /* right stick pushes this close to an axis become pure up/down/left/right; 0 = off, keep < 45 */ /* ---- Player: ground movement ------------------------------------------- */ -#define PLAYER_MAX_SPEED 9.0f /* m/s at full stick tilt; higher = faster top run speed */ -#define PLAYER_GROUND_ACCEL 30.0f /* m/s^2 toward target speed; higher = snappier starts */ -#define PLAYER_GROUND_FRICTION 40.0f /* m/s^2 slowdown with stick released; higher = snappier stops */ +#define PLAYER_MAX_SPEED 6.0f /* m/s at full stick tilt; higher = faster top run speed (kept modest: later moves go faster) */ +#define PLAYER_GROUND_ACCEL 8.4f /* m/s^2 toward target speed; lower = heavier, slower starts */ +#define PLAYER_GROUND_FRICTION 11.3f /* m/s^2 slowdown with stick released; lower = longer skid to a stop */ #define PLAYER_TURN_RATE 12.0f /* rad/s max facing rotation on ground; higher = tighter turns */ +#define PLAYER_SNAP_TURN_DEG 90.0f /* degrees; standing still, bigger turns than this are instant; lower = more snapping */ /* ---- Player: air movement ---------------------------------------------- */ -#define PLAYER_AIR_CONTROL 0.30f /* 0..1 multiplier on accel + turn rate in air; higher = more steerable jumps */ +#define PLAYER_AIR_CONTROL 0.30f /* 0..1 multiplier on turn rate in air; higher = jumps turn more sharply */ +#define PLAYER_AIR_ACCEL 9.0f /* m/s^2 toward target speed in air; higher = more steerable jumps */ #define PLAYER_JUMP_VELOCITY 14.0f /* m/s upward at jump start; higher = taller jumps (~2.4 m apex at 14) */ #define PLAYER_JUMP_CUT 0.50f /* vel.y multiplier on early A release; lower = shorter taps */ -- cgit v1.2.3-18-g5258