Nimbin[12]?Games / Entropie / commits / 7adb8e5

Entropie git · main

Entropie festival game; first steps

sdl c game entropie cmake · first commit 2026-10-10 · last commit 2026-11-02 (17 hours ago) · synced 8 hours ago

C 88.5% Markdown 9.1% GLSL 2.3%
git clone https://git.christianimmanuel.de/games/Entropie.gitwget https://git.christianimmanuel.de/games/Entropie/archive/Entropie.tar.gz

entropie 2.22.0: the leading shoulder

Christian Immanuel · 2026-10-20 22:06 · 7adb8e5f81b1ebf76b213ae4517c63a7032a44f9

- Climbing a high ledge: the shoulder of the hand that reaches first turns
  ahead, easing back as the other hand follows
 commit_message.txt              |  7 +++----
 entropie/Makefile               |  2 +-
 entropie/README.md              |  3 ++-
 entropie/STATE.md               |  7 +++++--
 entropie/commit_message.txt     | 24 +++---------------------
 entropie/src/people/body.h      |  1 +
 entropie/src/people/body_pose.c |  2 +-
 entropie/src/people/climb.c     |  2 ++
 entropie/src/people/hands.c     |  4 +++-
 entropie/src/people/hands.h     |  3 ++-
 10 files changed, 23 insertions(+), 32 deletions(-)

diff --git a/commit_message.txt b/commit_message.txt
index 755deb6..a0d247c 100644
--- a/commit_message.txt
+++ b/commit_message.txt
@@ -1,5 +1,4 @@
-entropie 2.21.0: the careful way up
+entropie 2.22.0: the leading shoulder
 
-- Hip-high ledges: less sporty and older people turn round, hop up to sit
-  on the edge with the legs hanging, swing the legs up onto it (sitting
-  cross-legged a moment) and stand up
+- Climbing a high ledge: the shoulder of the hand that reaches first turns
+  ahead, easing back as the other hand follows
diff --git a/entropie/Makefile b/entropie/Makefile
index 278d9c1..d5ad372 100644
--- a/entropie/Makefile
+++ b/entropie/Makefile
@@ -1,5 +1,5 @@
 APP       := entropie
-VERSION   := 2.21.0
+VERSION   := 2.22.0
 
 PREFIX    ?= /usr
 BINDIR    ?= $(PREFIX)/bin
diff --git a/entropie/README.md b/entropie/README.md
index e922de1..0246db2 100644
--- a/entropie/README.md
+++ b/entropie/README.md
@@ -336,7 +336,8 @@ and satellite pictures (about 340 x 340 m).
 - Walking up to something you can climb, your hands go onto its edge; pulling
   up, the feet push against its face, then one knee and foot come over the
   edge, then the other (never through it). The hands stay pressed on top and
-  the back bends over the edge. One hand gets there first, the other follows
+  the back bends over the edge. One hand gets there first (its shoulder
+  turned ahead), the other follows
 - Hip high, the less sporty and the old take the careful way: back to it, a
   hop up to sit on the edge, legs swung up onto it, then stand up
 - Jumps take off from one foot (rarely both at once); at a run, the rear foot
diff --git a/entropie/STATE.md b/entropie/STATE.md
index ccbcc37..1ff37d7 100644
--- a/entropie/STATE.md
+++ b/entropie/STATE.md
@@ -287,6 +287,9 @@ Round 2.20:
 Round 2.21:
 - The careful way up (`climb.c` sitWay, `ClimbMove.sit_way`): something SIT_LOW 0.55 .. SIT_HIGH 1.05 m high (scaled), for the less sporty (fitness under SIT_FIT 0.45) or old (pace under 0.8): turned round with the back to it, a hop up so the hips sit on the edge, legs hanging (hands behind on it), the knees swing up and round onto it (turning back to face it: sitting cross-legged on top for a moment), stood up. SIT_TIME 3.2 s fresh. The body sits for it (`world.c`: sit_goal from `climb_move.sit_now`, not the pull-up pose meanwhile).
 
+Round 2.22:
+- Climbing a high ledge, the shoulder of the first hand goes ahead: the shoulders turn up to REACH_TURN 0.35 rad to that side while the other hand still trails (`Hands.edge_turn`, set by `Climb_update`; `Body.reach_turn`, added to the chest turn in `body_pose.c`), easing back as the second hand arrives.
+
 Unfinished building (Shell_build, at SHELL_AT in the frame's frame): brick shell 6.4 x 4.7, walls 2.9, open front (2 m) to the frame (now only the front half: pillars at z -13.8 / -9.2), window holes, bare floor, tiled roof with slabs. Barn: brick courses on BUILDING_BRICK walls (`addBrickCourses`: mortar a shade lighter, so the ink doesn't trace it), ivy (`Shapes_ivy`, OBJ_STRUCTUREs) on both long sides; the woodpile (OBJ_WOODPILE "Woodpile", WOODPILE_A/B) left of the toilet, everybody's woodpile from the start (`scene.c` Scene_finish). Fireplace tripod: wooden poles, feet TRIPOD_OUT 0.9 m outside the stones, TRIPOD_PAST 0.4 m past the top, a lashing; each pole an OBJ_WALL along it ("Tripod pole"). Gates (FURN_GATE, green boards): in your garages' doorways (GATES: hinge, end), `gate_open` / `gate_t`, `hinge`, `gate_shut` / `gate_out`; Object_swingGate (1.2 s), driven by showProps; a click within 1.2 m opens / shuts both leaves.
 
 Props that show (1.89, `world.c` showProps every frame): the tin's mesh is built again when its butts change (`Shapes_ashtray`: up to 12 show, the ash rises, a heap from 14; `shown` = what's built).
@@ -422,7 +425,7 @@ Most important first.
 
 **Body and moving**
 - Obstacle approach, still to do: thin round logs (under 0.2 m) are still stepped over; a step in between on top of something unstable (if clumsy); NPCs: pull up on their own for their own reasons (now only following a leader), jumping onto things
-- Climbing rework, still to do: the shoulder going ahead with the first hand; another way up by height, surface and person: belly first and roll (in: one hand first, the knee up, the other foot next to it; sitting on it and swinging the legs up)
+- Climbing rework, still to do: another way up by height, surface and person: belly first and roll (in: one hand first, the knee up, the other foot next to it; sitting on it and swinging the legs up)
 - Balance: hips over the feet, look for stable footing, play with balance
 - Personal movement styles, still to do: gesture variants; stepping over and climbing their own way; sporty ones more elegant (walking styles are in)
 - More gestures and feelings to pick personalities from: the lists in Body / Fidgets and Gestures can grow
@@ -446,4 +449,4 @@ Most important first.
 - Drawing many figures on a real graphics card: not measured (software GL: 300 people cost 3x the rest of the scene)
 
 ---
-State of `entropie 2.21.0 (build 3f347be)`
+State of `entropie 2.22.0 (build 6c2f7b9)`
diff --git a/entropie/commit_message.txt b/entropie/commit_message.txt
index f6b27b0..a0d247c 100644
--- a/entropie/commit_message.txt
+++ b/entropie/commit_message.txt
@@ -1,22 +1,4 @@
-entropie 2.8.0: the welcome, the meadow behind the garages, the owners
+entropie 2.22.0: the leading shoulder
 
-- Arrival: off the street onto the gravel road beside the main building;
-  from the driver's seat the car is whole (doors, seats, roof) and the
-  others sit in it with you
-- First say hello: Kurti and his sons sit at the fire, the others go over;
-  they welcome you, sit down for a chat with Kurti, then the work starts
-  (the boot opens). The hint line says what's to do next
-- Behind your garages: a meadow 1.5 m up (steep bank behind them, the way up
-  by the little path left of them), bushes and trees round it that may not
-  be cut; the tents go there
-- Right of the main building: a meadow 0.6 m up, bushes behind and right;
-  the tap moved to the main building's right end
-- The car room's door nearer its middle: its open gates no longer block the path
-- Crates go into the kitchen in your garages; carrying one tires you, put
-  it down for a moment or carry it with two (F, E)
-- Kurti: a belly, never takes his shirt off. Kurti and his sons don't do or
-  help with your jobs, go into the house now and then (call them: they come
-  out); the others keep out of the house
-- On a break tools are put down: neatly or anyhow, by orderliness; an axe
-  lies on its side
-- No stray bottles, only a little litter
+- Climbing a high ledge: the shoulder of the hand that reaches first turns
+  ahead, easing back as the other hand follows
diff --git a/entropie/src/people/body.h b/entropie/src/people/body.h
index ee71f41..fe7598f 100644
--- a/entropie/src/people/body.h
+++ b/entropie/src/people/body.h
@@ -219,6 +219,7 @@ typedef struct {
     bool  from_knees;        /* falling back while getting up */
     int   fall_style;        /* how this fall looks (see body.c) */
     float fall_twist;        /* radians the body turns while going down */
+    float reach_turn;        /* the shoulders turned this far (reaching up with one hand first: that shoulder ahead) */
     float fall_time;         /* seconds this fall takes */
     float fall_delay;        /* > 0: staggering backwards before going down */
     Vec3  fall_pending;
diff --git a/entropie/src/people/body_pose.c b/entropie/src/people/body_pose.c
index 3e0495f..1397a4b 100644
--- a/entropie/src/people/body_pose.c
+++ b/entropie/src/people/body_pose.c
@@ -552,7 +552,7 @@ static void solveStanding(Body *b, Vec3 position, Vec3 facing, float s, float dt
 
     /* Hips turn a little with the forward leg, shoulders counter-turn */
     float hip_turn = clampf(stride * 0.2f, -0.12f, 0.12f);
-    float chest_turn = -0.9f * hip_turn + clampf(b->turn_rate * 0.06f, -0.15f, 0.15f);
+    float chest_turn = -0.9f * hip_turn + clampf(b->turn_rate * 0.06f, -0.15f, 0.15f) + b->reach_turn;
     float swing_yaw = 0.0f; /* (the head goes along a little: below) */
     {   /* Both hands busy off to one side (a swing, a saw): the shoulders turn that way, the hips
            a little too; up high (winding up) the back arches, down low (the hit) it bends into it */
diff --git a/entropie/src/people/climb.c b/entropie/src/people/climb.c
index 2b6de15..268d30f 100644
--- a/entropie/src/people/climb.c
+++ b/entropie/src/people/climb.c
@@ -10,6 +10,7 @@
 #define SIT_HIGH    1.05f /* ... up to this */
 #define SIT_FIT     0.45f /* ... for those less sporty than this (or old: slow on their feet) */
 #define SIT_TIME    3.2f  /* s it takes (fresh) */
+#define REACH_TURN  0.35f /* rad the shoulders turn, the first hand's side going up ahead */
 #define CLIMB_OVER  0.5f  /* ... from this high over it at the body: the way there is clear */
 
 static bool onlyWalls(const Object *o, const void *ctx) {
@@ -284,6 +285,7 @@ bool Climb_update(const World *world, Object *p, float dt) {
         /* (one hand reaches up first, the other after it - the sporty quicker; that shoulder goes ahead) */
         p->hands.edge_lead = p->main_hand;
         p->hands.edge_trail = 1.0f - smoothstepf(0.1f, 0.24f + 0.08f * (1.0f - p->fitness), t);
+        p->hands.edge_turn = (p->main_hand == HAND_LEFT ? REACH_TURN : -REACH_TURN) * smoothstepf(0.0f, 0.08f, t) * p->hands.edge_trail;
     }
     else if (t < 0.8f) Hands_touch(p, c->edge);
     if (t >= 1.0f) {
diff --git a/entropie/src/people/hands.c b/entropie/src/people/hands.c
index 8445b10..181bc0f 100644
--- a/entropie/src/people/hands.c
+++ b/entropie/src/people/hands.c
@@ -1071,6 +1071,7 @@ void Hands_update(Object *who, float dt) {
         }
         h->touching = false;
     }
+    if (!h->on_edge) b->reach_turn = 0.0f;
     if (h->on_edge) { /* hanging on, pulling up: both hands on the edge */
         for (int hand = 0; hand < 2; hand++) {
             if (h->state[hand] != HAND_FREE) continue;
@@ -1080,9 +1081,10 @@ void Hands_update(Object *who, float dt) {
             if (hand != h->edge_lead && h->edge_trail > 0.0f) /* (one hand reaches up first; the other follows from down by the shoulder) */
                 b->hand_target[hand] = vec3_add(b->hand_target[hand], vec3(0.0f, -0.5f * s * h->edge_trail, 0.0f));
         }
+        b->reach_turn = h->edge_turn;
         b->crouch_goal = fmaxf(b->crouch_goal, h->edge_crouch);
         h->on_edge = false;
-        h->edge_trail = 0.0f;
+        h->edge_trail = h->edge_turn = 0.0f;
     }
 }
 
diff --git a/entropie/src/people/hands.h b/entropie/src/people/hands.h
index ac1d299..0633ff8 100644
--- a/entropie/src/people/hands.h
+++ b/entropie/src/people/hands.h
@@ -53,7 +53,8 @@ typedef struct {
     Vec3           edge_point, edge_across;
     float          edge_crouch;
     int            edge_lead;      /* ... this hand gets there first ... */
-    float          edge_trail;     /* ... the other still this far behind (1: down by the shoulder, 0: on it too) */
+    float          edge_trail;     /* ... the other still this far behind (1: down by the shoulder, 0: on it too) ... */
+    float          edge_turn;      /* ... the shoulders turned this far, the first hand's side ahead (radians) */
     float          settle[2];      /* 0 -> 1 just after taking an item: it turns into the carry pose */
     bool           by_neck[2];     /* bottles: held at the neck (rare) instead of low around the body */
     float          miss_time;      /* grabbing: seconds the hands couldn't reach their grip */