summaryrefslogtreecommitdiff
path: root/platformer/src/config.h
diff options
context:
space:
mode:
authorSchark <jordan@schark.online>2026-09-29 18:26:32 -0400
committerSchark <jordan@schark.online>2026-09-29 18:26:32 -0400
commit25992eb0baa1be5b49e8732e4b63734cdafe3b80 (patch)
tree20afa57514ba4ca2cb41fa1c6f8ee46bbd64d50a /platformer/src/config.h
parent87486b2f6c11791d1e192bba8a583a994f273201 (diff)
downloadgamedev-25992eb0baa1be5b49e8732e4b63734cdafe3b80.tar.gz
gamedev-25992eb0baa1be5b49e8732e4b63734cdafe3b80.zip
Small inertia and movement tweaks
Diffstat (limited to 'platformer/src/config.h')
-rw-r--r--platformer/src/config.h23
1 files changed, 15 insertions, 8 deletions
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 */