Nimbin[12]?Games / Entropie / commits / 276a683

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 1.82.0: everyone walks their own way

Christian Immanuel · 2026-10-15 16:40 · 276a6834cfd7fe138a21e9ae349d019740969890

- Walking styles: feet wider or narrower, toes out more or less, bouncier
  or flatter (livelier when lively), hips swaying more or less
- The ashtray stands on the cool box by the fire (on the ground it was in
  everybody's way)

Includes 1.81.0 (if not committed separately):
- Fix: following someone on a chat break (and walking up to things) went
  walk-stop-walk every frame, the whole body shook; now they slow down
  coming up and stay with them
- Fix: an elbow could flip over when a hand went up past the shoulder
  (scratching the head); it turns round the arm now

Includes 1.80.0 (if not committed separately):
- An old tin by the fire as ashtray: you and the tidy put butts in there
- The Urinella is drawn while it's used; the dress is lifted higher
- After peeing you take up again what you put down
- The others can slip off a wobbly ladder too

Includes 1.79.0 (if not committed separately):
- Helpers (G) follow you up a leaning ladder onto a roof or wall and down
  again; without a ladder they pull themselves up after you (if they reach)
  and jump down when you're down
- Pulling up is a module for anybody now (people/climb.c), not only you

Includes 1.78.0 (if not committed separately):
- Cold nights: away from the fire a jacket goes on (each their own colour)
- Working hard in the midday sun your shirt comes off too
- Women who never tried a Urinella may try one: some like it, some don't
- Dying for a smoke makes restless; a wobbling ladder rocks
- Moving heavy wood: tested with a called helper; the player is asked when
  nobody else is around

Includes 1.77.0 (if not committed separately):
- Ladders: carried nearly upright when out; stood up on their own they
  fall over; leaned, how steady they stand depends on angle, ground, feet
  and what holds them; a wobbly one wobbles, then slips and falls with you
- Somebody holds it (hands on the rails, a foot on the bottom rung):
  helpers (G) when you climb, helpful people when it looks wobbly
- The work place: the tidy clear away what lies where they'd stand; no room
  to swing, they take the piece somewhere with room (carried, or dragged
  with somebody called to help)
- The sporty pull up and climb ladders much quicker

Includes 1.76.0 (if not committed separately):
- Smoking: packs and tobacco in the pockets (used up); smokers get a
  craving and light up in a quiet moment - rolling one first, the lighter
  to it, drags (the tip glows), smoke breathed out, the butt flicked away
- Shared: "Got a light?", bumming a cigarette (or a no); talk to ask for
  one or offer one; K lights yours / puts it out; Tab shows your pockets
- Shadows: soft, smooth edges instead of stair steps

Includes 1.75.0 (if not committed separately):
- Urinellas: one-time use, up to 4 in the pocket; a box by the toilet
  refills it (the others fetch more when they run out, you click it)
- Peeing: what's in the hands is put down first (the others take it up
  again); standing, the fly is open or the skirt or dress lifted
- Lighter: needed to light the fire, runs empty; borrowed when there's
  none, given back (or not), owners ask for it; talk: borrow, give back,
  ask for yours back
- Working hard in the midday sun the shirt comes off (women keep a top)
- Dropping from high up: knees pulled up, legs reach for the ground, deep
  into the knees, a roll or a crash
- Ladders: one-handed climbing (you may slip), a lying ladder is stepped
  over, kicked it hardly moves and your toe hurts
- Dev menu: teleport to the parkour / yard; the player spawns 1 m up

Includes 1.74.0 (if not committed separately):
- Fix: legs showed through a skirt or dress standing normally; the thighs
  under it are cloth now and it's wider over the hips
- Mila's Urinellas come in a pack of 3 (then she squats); now and then a
  mishap (on the shoes); used ones go into the bag, are dropped or flung
  away (drunk) as trash

Includes 1.73.0 (if not committed separately):
- Clothes: trousers, shorts, skirt, dress; squatting to pee trousers come
  down, a skirt or dress is gathered up

Includes 1.72.0 (if not committed separately):
- Fix: walking off the other way from something half stepped over left
  one foot planted behind, sliding along

Includes 1.71.0 (if not committed separately):
- Two-handed fidgets: rubbing the hands, hands behind the head, both
  hands on the hips

Includes 1.70.0 (if not committed separately):
- More one-hand gestures (neck, nose, ear, hair, thumb in the belt, hand
  on the chest, shading the eyes); mood and personal habits pick them

Includes 1.69.0 (if not committed separately):
- Faster with a crowd: 750 people 22 -> 14 ms a frame (kind index, cell
  grid for company, no foot checks far from you)

Includes 1.68.0 (if not committed separately):
- The walking map is updated in place when fixed things change
  (0.3 ms instead of 10 ms)

Includes 1.67.0 (if not committed separately):
- Pour your drink on the fire (C): a small fire goes out, a big one
  hisses, vodka flares up

Includes 1.66.0 (if not committed separately):
- Careful people sort the woodpile by length (front even) and put the
  branches lying about onto a heap at the end of the woodpile

Includes 1.65.0 (if not committed separately):
- Smooth off the ladder (a step back, one foot after the other) and
  taking it down (the hand reaches for the rail at chest height)

Includes 1.64.0 (if not committed separately):
- Smooth ladder and climbs: getting on, over the edge at the top, feet
  from where they are; the easy 1 m climb no longer drops you off again

Includes 1.63.0 (if not committed separately):
- The hose melts in the fire (leaks, burns through); duct tape and the
  shears mend it

Includes 1.62.0 (if not committed separately):
- Smooth pull-ups: no hop at the end, feet and knees ease over the edge,
  elbows and hands taking hold blend in (audit walk: joint jumps 161 -> 58)

Includes 1.61.0 (if not committed separately):
- A step ladder in the tool room: stands on its own, at a wall with its
  back to it; climb onto the wall from its top

Includes 1.60.0 (if not committed separately):
- A folding ladder (two 2.5 m halves on a hinge, 5 m open) beside the
  telescopic one; one click at a wall unfolds it and leans it there

Includes 1.59.0 (if not committed separately):
- Stepping up onto blocks above knee high; set moves and jumps only for
  things standing on the ground in front of you

Includes 1.58.0 (if not committed separately):
- Walking over knee-high things is one smooth set move that always
  finishes; at a run: jump up onto blocks, catch climbable edges
 entropie/Makefile               | 2 +-
 entropie/README.md              | 4 +++-
 entropie/STATE.md               | 8 +++++---
 entropie/commit_message.txt     | 8 +++++++-
 entropie/src/people/body.c      | 8 ++++++--
 entropie/src/people/body.h      | 1 +
 entropie/src/people/body_pose.c | 5 +++--
 entropie/src/world/site.c       | 5 +++--
 8 files changed, 29 insertions(+), 12 deletions(-)

diff --git a/entropie/Makefile b/entropie/Makefile
index 46189d2..b0a707b 100644
--- a/entropie/Makefile
+++ b/entropie/Makefile
@@ -1,5 +1,5 @@
 APP       := entropie
-VERSION   := 1.81.0
+VERSION   := 1.82.0
 
 PREFIX    ?= /usr
 BINDIR    ?= $(PREFIX)/bin
diff --git a/entropie/README.md b/entropie/README.md
index 8910365..bd199c8 100644
--- a/entropie/README.md
+++ b/entropie/README.md
@@ -166,6 +166,8 @@ and satellite pictures (about 340 x 340 m).
   down just before the ground. Over about 1.3 m you go deep into the knees;
   over about 2.5 m the fit roll it off, the others crash (energy, dirt)
 - The sporty pull up and climb ladders much quicker
+- Everyone walks their own way: feet wider or narrower, toes out a bit more
+  or less, bouncier or flatter (livelier when lively), hips swaying more or less
 - Running into something sober: low, you trip or go headlong over it; high,
   you stagger back or go down to the side you came in from. How badly
   depends on speed, fitness, energy and clumsiness
@@ -444,7 +446,7 @@ say no more often and don't come to you for a bit.
 - A drag now and then (the tip glows), smoke breathed out, the hand up in
   front between drags. Hands needed: it goes into the mouth
 - Done: flicked away or dropped as a butt (into the fire when close; the
-  tidy and you use the old tin by the fire as ashtray)
+  tidy and you use the old tin on the cool box by the fire as ashtray)
 - K: light one (yours, or somebody next to you gives you a light), K again
   puts it out. Talk: ask somebody for a cigarette, or offer one
 - Packs and tobacco run out; Tab (skills page) shows your pockets
diff --git a/entropie/STATE.md b/entropie/STATE.md
index 1bc1746..85f2881 100644
--- a/entropie/STATE.md
+++ b/entropie/STATE.md
@@ -68,7 +68,9 @@ Shadows: 3x3 PCF with each tap blended bilinearly between its 4 texels (`common.
 
 Climbing for anybody (`people/climb.c`, moved out of the game): `Climb_ledgeAhead`, `Climb_start` (says why not: hands, strength, drunk), `Climb_update` (the pull up, its feet and hands), `Climb_overLadderTop`; the move lives in the person (`climb_move`). Helpers (`ai_help.c` ai_followByLadder): the leader 1.2 m higher (standing, not climbing): a leaning ladder within 25 m from their level to the leader's (top within 1.3 m) - to its foot, up (`ai_climbing`: on a ladder or pulling over its top this runs first, whatever the mode), over the edge; none, and the leader within reach (CLIMB_REACH): walk at it and pull up where the edge ahead is at the leader's level ("Hup!"). The leader 1.2 m lower: to the top of a ladder from up there and down it; none: they just walk off (the landing does the rest). A ladder leading nowhere (no top to get off at): down again after 8 s. `Ai_useWorld` gives the AI the world for this.
 
-Ashtray (FURN_ASHTRAY, an old tin by the fire, `stored` = butts): a finished cigarette within 4 m of it goes in if it's yours or the smoker is tidy (likes trash over 0.2 or pride over 0.4, under 0.6 drunk). The Urinella is drawn while it's used (skeleton `uri`, a funnel from the body to the spout; the stream starts at its end); standing with one, a skirt or dress is lifted higher in front. You take up again what you put down to pee (`ai.set_aside`, within 1.8 m). The others slip off wobbly ladders like you (`ai_climbing`: wobble, then the ladder falls sideways).
+Walking styles (`Body.style[4]`, -1..1 per person, made from the quirks - no extra dice, so nothing else changes): feet apart x (1 + 0.15 style0), toes out + 0.04 rad x style1, the bob x (1 + 0.35 style2 + 0.25 lively), the hips swaying over the standing foot x (1 + 0.35 style3). (The audit swings both ways with it - it changes where everybody goes; overall the player's numbers are lower.)
+
+Ashtray (FURN_ASHTRAY, an old tin on the cool box by the fire - on the ground it was in everybody's way, `stored` = butts): a finished cigarette within 4 m of it goes in if it's yours or the smoker is tidy (likes trash over 0.2 or pride over 0.4, under 0.6 drunk). The Urinella is drawn while it's used (skeleton `uri`, a funnel from the body to the spout; the stream starts at its end); standing with one, a skirt or dress is lifted higher in front. You take up again what you put down to pee (`ai.set_aside`, within 1.8 m). The others slip off wobbly ladders like you (`ai_climbing`: wobble, then the ladder falls sideways).
 
 Smoother: walking up to something (`goTo`) slows down as they get there (no full speed then stop, then on again); on a chat break they stay "close" until 1.6 x the chatting distance (was: one frame walking, one standing, after somebody walking slowly - the whole body shook). Arms: when the elbow's pole lies nearly along the arm (a hand going up past the shoulder) the bend leans on "out to the side" or "down and back", blended (`twoBone`, arms only), and an elbow moves at most 5.5 m/s (`JOINT_TOP_ELBOW`): no elbow flipping over (worst arm jump in the audit 58 -> 40 cm).
 
@@ -185,7 +187,7 @@ Most important first.
 - Obstacle approach, still to do: prefer a step in between on top of something stable (or unstable, if clumsy) over a long stride; NPCs: pull up on their own for their own reasons (now only following a leader), jumping onto things
 - Climbing rework: hands first (one reaches first, shoulder ahead), a knee up, the other foot next to it; or sit on it and lift the legs; or belly first and roll; by height, surface and person
 - Balance: hips over the feet, look for stable footing, play with balance
-- Personal movement styles: gesture variants, each person a bit their own; stepping over and climbing their own way; sporty ones more elegant
+- 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
 
 **People**
@@ -203,4 +205,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 1.81.0 (build 255293d)`
+State of `entropie 1.82.0 (build 274c0cf)`
diff --git a/entropie/commit_message.txt b/entropie/commit_message.txt
index b13057c..dae1255 100644
--- a/entropie/commit_message.txt
+++ b/entropie/commit_message.txt
@@ -1,5 +1,11 @@
-entropie 1.81.0: no stop-go walking, no flipping elbows
+entropie 1.82.0: everyone walks their own way
 
+- Walking styles: feet wider or narrower, toes out more or less, bouncier
+  or flatter (livelier when lively), hips swaying more or less
+- The ashtray stands on the cool box by the fire (on the ground it was in
+  everybody's way)
+
+Includes 1.81.0 (if not committed separately):
 - Fix: following someone on a chat break (and walking up to things) went
   walk-stop-walk every frame, the whole body shook; now they slow down
   coming up and stay with them
diff --git a/entropie/src/people/body.c b/entropie/src/people/body.c
index 6fe3847..60f89ee 100644
--- a/entropie/src/people/body.c
+++ b/entropie/src/people/body.c
@@ -54,7 +54,7 @@ static float groundUnder(const BodyFrame *f, float x, float z, float s) {
 
 static Vec3 footSpot(const Body *b, const BodyFrame *f, int side, float s) {
     float sign = side == 0 ? -1.0f : 1.0f;
-    float width = FOOT_X * (1.0f + 0.12f * proudness(b) - 0.2f * shyness(b));
+    float width = FOOT_X * (1.0f + 0.12f * proudness(b) - 0.2f * shyness(b) + 0.15f * b->style[0]); /* (their own way) */
     Vec3 spot = vec3_add(f->position, vec3_scale(rightOf(f->facing), sign * width * s));
     spot = vec3_add(spot, vec3_scale(f->facing, b->stand_ahead * s)); /* (in front of a seat) */
 
@@ -93,7 +93,7 @@ static Vec3 footSpot(const Body *b, const BodyFrame *f, int side, float s) {
 /* Direction a planted foot points: a little outwards, inwards when shy. */
 static Vec3 footDir(const Body *b, Vec3 facing, int side) {
     float sign = side == 0 ? -1.0f : 1.0f;
-    return turnRight(facing, sign * (TOE_OUT - 0.42f * shyness(b)));
+    return turnRight(facing, sign * (TOE_OUT + 0.04f * b->style[1] - 0.42f * shyness(b)));
 }
 
 /* A foot's spot may not cross over to the other foot's side. */
@@ -905,6 +905,10 @@ void Body_update(Body *b, const BodyFrame *f) {
         b->rng = 0x9E3779B9u ^ (unsigned)(int)(f->position.x * 7919.0f) ^ ((unsigned)(int)(f->position.z * 104729.0f) << 7);
         if (b->rng == 0) b->rng = 1;
         for (int k = 0; k < 4; k++) b->quirk[k] = random01(b) * 2.0f - 1.0f;
+        for (int k = 0; k < 4; k++) { /* (from the quirks, not the dice: everything else stays as it was) */
+            float h = sinf(b->quirk[k] * 127.1f + b->quirk[(k + 1) % 4] * 311.7f + (float)k * 74.7f) * 43758.5453f;
+            b->style[k] = (h - floorf(h)) * 2.0f - 1.0f;
+        }
         b->habit[0] = (unsigned char)(1 + (int)(random01(b) * (float)(GESTURE_COUNT - 1)) % (GESTURE_COUNT - 1));
         b->habit[1] = (unsigned char)(1 + ((int)b->habit[0] + (int)(random01(b) * (float)(GESTURE_COUNT - 2))) % (GESTURE_COUNT - 1));
         b->gesture_timer = 3.0f + 6.0f * random01(b);
diff --git a/entropie/src/people/body.h b/entropie/src/people/body.h
index d822a23..420dc91 100644
--- a/entropie/src/people/body.h
+++ b/entropie/src/people/body.h
@@ -192,6 +192,7 @@ typedef struct {
     float fore[2], fore_vel[2]; /* elbow bend */
     float weight_shift, weight_goal, weight_timer; /* idle: standing on one leg more */
     float quirk[4];          /* per person: lopsided arm swing, shoulders, head tilt, elbows (-1..1) */
+    float style[4];          /* per person, how they walk (-1..1): feet wide or narrow, toes out or in, bouncy or flat, hips swaying or still */
     unsigned char habit[2];  /* per person: two gestures they make more than others */
     int   gesture;           /* idle: one hand on the hip, at the head, at the chin, ... */
     int   gesture_side;
diff --git a/entropie/src/people/body_pose.c b/entropie/src/people/body_pose.c
index cc688b2..fb33c03 100644
--- a/entropie/src/people/body_pose.c
+++ b/entropie/src/people/body_pose.c
@@ -471,7 +471,7 @@ static void solveStanding(Body *b, Vec3 position, Vec3 facing, float s, float dt
     for (int i = 0; i < 2; i++) {
         const Foot *other = &b->feet[1 - i];
         if (b->feet[i].stepping && !other->stepping) {        /* standing on the other foot */
-            sway = ankle[1 - i].x * 0.3f * sinf(PI_F * b->feet[i].step);
+            sway = ankle[1 - i].x * 0.3f * (1.0f + 0.35f * b->style[3]) * sinf(PI_F * b->feet[i].step); /* (some sway their hips more) */
             hip_y[i] = -0.018f * sinf(PI_F * b->feet[i].step); /* the free hip drops a little */
         }
     }
@@ -514,7 +514,8 @@ static void solveStanding(Body *b, Vec3 position, Vec3 facing, float s, float dt
             if (b->feet[i].stepping) { sum += cosf(2.0f * PI_F * b->feet[i].step); n++; }
         springCritical(&b->bob, &b->bob_v, n ? sum / (float)n : -1.0f, BOB_OMEGA, dt);
         float go = smoothstepf(BOB_FROM, BOB_FULL, speed) * (b->airborne ? 0.0f : 1.0f);
-        float amp = go * (BOB_FIT + BOB_UNFIT * (1.0f - b->fitness));
+        float amp = go * (BOB_FIT + BOB_UNFIT * (1.0f - b->fitness))
+                  * (1.0f + 0.35f * b->style[2] + 0.25f * clampf(b->shown.energy, 0.0f, 1.0f)); /* (bouncy or flat: their own, livelier when lively) */
         wave = 0.5f * (clampf(b->bob, -1.0f, 1.0f) - 1.0f); /* (0 up .. -1 down: never stretches the legs) */
         pitch += go * BOB_NOD * (1.0f - b->fitness) * wave;
         wave *= amp;
diff --git a/entropie/src/world/site.c b/entropie/src/world/site.c
index a502df6..eaa1ce7 100644
--- a/entropie/src/world/site.c
+++ b/entropie/src/world/site.c
@@ -844,8 +844,9 @@ static bool furnishYard(World *world) {
                                                vec3(1.8f, SEAT_HEIGHT, 0.36f), yawFor(tangent));
         if (!bench || !World_add(world, bench)) return false;
     }
-    { /* an old tin as ashtray, between two benches */
-        Object *tin = Object_createFurniture(FURN_ASHTRAY, court(FIRE_A - 2.3f, FIRE_B - 1.5f), vec3(0.1f, 0.12f, 0.1f), 0.0f);
+    { /* an old tin as ashtray, on the cool box by the fire (on the ground it was in everybody's way) */
+        Vec3 on_box = vec3_add(court(FIRE_A - 3.1f, FIRE_B + 2.6f), vec3(0.0f, 0.45f, 0.0f));
+        Object *tin = Object_createFurniture(FURN_ASHTRAY, on_box, vec3(0.1f, 0.12f, 0.1f), 0.0f);
         if (!tin || !World_add(world, tin)) return false;
     }
     for (int k = 0; k < 4; k++) { /* firewood quarters and dry branches */