diff options
| author | Schark <jordan@schark.online> | 2026-09-29 22:06:45 -0400 |
|---|---|---|
| committer | Schark <jordan@schark.online> | 2026-09-29 22:06:45 -0400 |
| commit | adb6a882870464490a8026aed1f66b21b0e72477 (patch) | |
| tree | d5fda18af1d42958d9b3f81b9566b05aabb366af /platformer/src/config.h | |
| parent | 21404c26d3907cefa524878fb031e7a2022fb3d7 (diff) | |
| download | gamedev-adb6a882870464490a8026aed1f66b21b0e72477.tar.gz gamedev-adb6a882870464490a8026aed1f66b21b0e72477.zip | |
Further movement tweaks, platforming fixes
Diffstat (limited to 'platformer/src/config.h')
| -rw-r--r-- | platformer/src/config.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/platformer/src/config.h b/platformer/src/config.h index 35feb4c..86677ac 100644 --- a/platformer/src/config.h +++ b/platformer/src/config.h @@ -38,7 +38,7 @@ * 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_GROUND_FRICTION 12.0f 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 @@ -49,6 +49,9 @@ * 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 + * PLAYER_JUMP_BUFFER 0.1f s an A press is remembered: if a jump becomes + * possible within it (landing, grabbing a + * wall), it happens then * PLAYER_JUMP_MAX_SPEED 7.0f m/s top horizontal speed during a normal * jump (a little past the run speed) * PLAYER_JUMP_BOOST_ACCEL 1.5f m/s^2 how slowly speed builds past the run @@ -65,7 +68,7 @@ * bleeds off in the air (gradual on purpose) * * Player: skid and retreat jump - * PLAYER_SKID_ANGLE_DEG 120.0f degrees; pulling the stick more than this + * PLAYER_SKID_ANGLE_DEG 130.0f degrees; pulling the stick more than this * away from the run direction skids * PLAYER_SKID_SPEED_FRACTION 0.95f of PLAYER_MAX_SPEED; a skid needs a full * run (or faster, once later moves exist) @@ -178,7 +181,7 @@ /* ---- Player: ground movement ------------------------------------------- */ #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_GROUND_FRICTION 12.0f /* 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 */ @@ -187,6 +190,7 @@ #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 */ +#define PLAYER_JUMP_BUFFER 0.1f /* s an early A press is remembered (e.g. just before landing); higher = more forgiving */ #define PLAYER_JUMP_MAX_SPEED 7.0f /* m/s top horizontal speed in a normal jump; higher = bigger reward for jumping at full run */ #define PLAYER_JUMP_BOOST_ACCEL 1.5f /* m/s^2 build past run speed in a normal jump; higher = reaches PLAYER_JUMP_MAX_SPEED sooner */ #define PLAYER_OVERSPEED_DECEL 2.0f /* m/s^2 ease back down to run speed after landing (stick held); lower = keeps the extra speed longer */ @@ -196,7 +200,7 @@ #define PLAYER_SECOND_JUMP_SLOWDOWN 3.5f /* m/s^2 bleed from run speed down to that top speed; lower = more gradual, higher = more abrupt */ /* ---- Player: skid and retreat jump ------------------------------------- */ -#define PLAYER_SKID_ANGLE_DEG 120.0f /* degrees off the run direction that counts as "pulling back"; lower = skids trigger more easily */ +#define PLAYER_SKID_ANGLE_DEG 130.0f /* degrees off the run direction that counts as "pulling back"; lower = skids trigger more easily */ #define PLAYER_SKID_SPEED_FRACTION 0.95f /* of PLAYER_MAX_SPEED needed to skid (full run or faster); lower = skid from slower runs */ #define PLAYER_SKID_DURATION 0.5f /* s from pulling back to stopped (and the retreat jump's window); higher = longer slide */ #define PLAYER_SKID_GLIDE_POWER 2.0f /* skid braking curve; 1 = even, higher = freer glide first, then a harder plant */ |
