summaryrefslogtreecommitdiff
path: root/platformer/src/config.h
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/src/config.h
parentfdc8c951fc72d9dc4c8faa58a21b2b9de0599698 (diff)
downloadgamedev-8af1210d45c3fa3f41a174d2906ab597dcc22f1c.tar.gz
gamedev-8af1210d45c3fa3f41a174d2906ab597dcc22f1c.zip
Final state of the game day 3HEADmaster
Diffstat (limited to 'platformer/src/config.h')
-rw-r--r--platformer/src/config.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/platformer/src/config.h b/platformer/src/config.h
index 86677ac..58520ab 100644
--- a/platformer/src/config.h
+++ b/platformer/src/config.h
@@ -95,6 +95,11 @@
* GRAVITY 40.0f m/s^2 (stronger than real 9.8 on purpose:
* platformers feel floaty with real gravity)
* TERMINAL_VELOCITY 50.0f m/s max fall speed
+ * STEP_HEIGHT 0.25f m; a grounded body walks up or down any ledge
+ * lower than this (stairs), with no jump or fall
+ * STEP_SMOOTH_RATE 14.0f 1/s; how fast the DRAWN and camera-followed
+ * height catches up after a stair step (physics
+ * steps instantly; this hides the pop)
*
* Player: size (used by render, and later by collision)
* PLAYER_HALF_WIDTH 0.4f m
@@ -130,6 +135,10 @@
* CAMERA_AUTO_PITCH_SPEED 0.054f rad/s; top speed of that tilt
* CAMERA_AUTO_PITCH_ACCEL 0.045f rad/s^2; how gently the tilt speeds up
* and slows down (ease in/out)
+ * CAMERA_COLLISION_RADIUS 0.25f m the eye keeps from objects
+ * CAMERA_RETURN_SPEED 3.0f m/s top speed the eye slides back out once an
+ * object stops blocking it (it snaps IN at once)
+ * CAMERA_RETURN_ACCEL 3.0f m/s^2 ease in/out of that return
* CAMERA_FOV_DEG 60.0f vertical field of view
* CAMERA_NEAR 0.1f
* CAMERA_FAR 500.0f
@@ -216,6 +225,8 @@
/* ---- Physics ----------------------------------------------------------- */
#define GRAVITY 40.0f /* m/s^2; stronger than real 9.8 on purpose, real gravity feels floaty */
+#define STEP_HEIGHT 0.25f /* m; ledges lower than this are walked up/down (stairs): no jump, no fall */
+#define STEP_SMOOTH_RATE 14.0f /* 1/s the drawn/camera height glides onto the body after a stair step; lower = smoother, laggier */
#define TERMINAL_VELOCITY 50.0f /* m/s max fall speed; lower = long falls feel more controlled */
/* ---- Player: size (used by render, and later by collision) ------------- */
@@ -243,6 +254,9 @@
#define CAMERA_AUTO_PITCH_DEG 15.0f /* degrees above horizontal the camera prefers to look down at the player */
#define CAMERA_AUTO_PITCH_SPEED 0.054f /* rad/s top tilt speed toward that angle; lower = slower, subtler tilt */
#define CAMERA_AUTO_PITCH_ACCEL 0.045f /* rad/s^2 ease in/out of the tilt; lower = softer start and stop */
+#define CAMERA_COLLISION_RADIUS 0.25f /* m the eye keeps from objects (never zones) */
+#define CAMERA_RETURN_SPEED 3.0f /* m/s top speed back out after an object stopped blocking; lower = slower, calmer */
+#define CAMERA_RETURN_ACCEL 3.0f /* m/s^2 ease in/out of that return, like the auto-tilt */
#define CAMERA_FOV_DEG 60.0f /* vertical field of view, degrees; higher = wider, faster-feeling view */
#define CAMERA_NEAR 0.1f /* m; near clip plane */
#define CAMERA_FAR 500.0f /* m; far clip plane (must reach past the world edge) */