Entropie git · main
Entropie festival game; first steps
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.gzentropie 2.34.0: no bow legs
- Knees point mostly straight ahead instead of following the turned-out toes; walking they sit slightly inside the hip-ankle line - Feet a bit closer together; running they nearly track on one line
commit_message.txt | 9 ++++----- entropie/Makefile | 2 +- entropie/README.md | 2 +- entropie/STATE.md | 8 ++++++-- entropie/commit_message.txt | 9 ++++----- entropie/src/people/body.c | 2 +- entropie/src/people/body_internal.h | 4 +++- entropie/src/people/body_pose.c | 2 +- 8 files changed, 21 insertions(+), 17 deletions(-) diff --git a/commit_message.txt b/commit_message.txt index 07b592e..8901eb8 100644 --- a/commit_message.txt +++ b/commit_message.txt @@ -1,6 +1,5 @@ -entropie 2.33.0: running and walking less stiff +entropie 2.34.0: no bow legs -- Running: a foot stays down a moment and the leg bends like a spring, then - a push off into a flight; the heel folds up under the seat and the knee - drives through; the body rises and falls clearly, leans into it, arms pump -- Walking: longer steps, more arm swing +- Knees point mostly straight ahead instead of following the turned-out + toes; walking they sit slightly inside the hip-ankle line +- Feet a bit closer together; running they nearly track on one line diff --git a/entropie/Makefile b/entropie/Makefile index 7ad37cc..63969e2 100644 --- a/entropie/Makefile +++ b/entropie/Makefile @@ -1,5 +1,5 @@ APP := entropie -VERSION := 2.33.0 +VERSION := 2.34.0 PREFIX ?= /usr BINDIR ?= $(PREFIX)/bin diff --git a/entropie/README.md b/entropie/README.md index 59681b5..de2f170 100644 --- a/entropie/README.md +++ b/entropie/README.md @@ -124,5 +124,5 @@ Dependencies point downward: `main → game → world/people → render → core ## Version -`make version` prints e.g. `entropie 2.33.0 (build 52d3a90)`. The build id is +`make version` prints e.g. `entropie 2.34.0 (build 55cf841)`. The build id is an md5 of all sources and assets. diff --git a/entropie/STATE.md b/entropie/STATE.md index 263a338..19660b8 100644 --- a/entropie/STATE.md +++ b/entropie/STATE.md @@ -606,7 +606,8 @@ and satellite pictures (about 340 x 340 m). spring under the body, then pushing off into a flight with both feet up; off the toes the heel folds up under the seat, the knee drives through in front and the foot reaches out to come down; the arms pump, bent about - square; the body leans into it. Walking: longer steps, the arms swing more + square; the body leans into it. Walking: longer steps, the arms swing more. + The knees point ahead (no bow legs), the feet run nearly on one line - Worn out, you can't run until you got your breath back a bit - The more tired the day makes you, the less energy you have: less to give, used up quicker, back slower, everything a bit weaker. Lively and sporty @@ -1196,6 +1197,9 @@ Round 2.32: Round 2.33 (running and walking less stiff): - Running (`body.c`, `body_pose.c`): a foot stays down STANCE_RUN 0.11 s at a full run (`Foot.planted`; it was gone again after a frame or two, both feet nearly always in the air); the wave follows the ground contact - down while a foot is on the ground, up past standing height in the flight (BOB_FLIGHT; it averaged two opposite feet to nothing: the hips moved 1 cm, now 7 cm), BOB_RUN deeper; the swing foot follows a curve with the body (cubic: from where it left, RUN_TUCK up behind the seat, RUN_DRIVE through in front, down where it lands; `Foot.swing_run` set as it leaves and easing off with SWING_RUN_EASE - slowing down mid-swing no jump); more lean (0.2 rad at a run); the elbows about square pumping. Walking: steps longer (stepLength 0.3 + 0.27 x speed, MAX_LEAD 0.48), arms swing more (ARM_SWING 1.25), the elbow bends more coming forward. Checked: side views of a sprint, a jog and a walk; the audit (sprint pops 247 -> 125, worst 15.7 -> 18.3 cm; the rest about as before - walking and turning fast the hands move that fast in the world anyway). +Round 2.34 (no bow legs): +- Knees point mostly straight ahead (`body_pose.c` knee pole: KNEE_FOLLOWS_FOOT 0.45 of the foot's turn, KNEE_OUT -0.12 - toes turned out made the knees bow out), feet a bit closer (FOOT_X 0.085, was 0.10; running 0.07, nearly on one line). Measured: knees from 0.5-1.7 cm outside the hip-ankle line to 1-2 cm inside walking, about on it sprinting. Checked: front views of a walk and a sprint. + ## Open tasks Most important first. @@ -1231,4 +1235,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.33.0 (build 52d3a90)` +State of `entropie 2.34.0 (build 55cf841)` diff --git a/entropie/commit_message.txt b/entropie/commit_message.txt index 07b592e..8901eb8 100644 --- a/entropie/commit_message.txt +++ b/entropie/commit_message.txt @@ -1,6 +1,5 @@ -entropie 2.33.0: running and walking less stiff +entropie 2.34.0: no bow legs -- Running: a foot stays down a moment and the leg bends like a spring, then - a push off into a flight; the heel folds up under the seat and the knee - drives through; the body rises and falls clearly, leans into it, arms pump -- Walking: longer steps, more arm swing +- Knees point mostly straight ahead instead of following the turned-out + toes; walking they sit slightly inside the hip-ankle line +- Feet a bit closer together; running they nearly track on one line diff --git a/entropie/src/people/body.c b/entropie/src/people/body.c index b793f34..15909e2 100644 --- a/entropie/src/people/body.c +++ b/entropie/src/people/body.c @@ -1238,7 +1238,7 @@ void Body_update(Body *b, const BodyFrame *f) { if (foot->swing_run > 0.0f && foot->over <= 0.0f) { /* Running: off the toes the heel folds up under the seat, the knee drives through in front, the foot reaches out and comes down (a curve that goes with the body) */ - Vec3 side = vec3_scale(rightOf(f->facing), (i == 0 ? -1.0f : 1.0f) * 0.1f * s); + Vec3 side = vec3_scale(rightOf(f->facing), (i == 0 ? -1.0f : 1.0f) * 0.07f * s); /* (running: the feet nearly on one line) */ Vec3 tuck = vec3_add(vec3_add(f->position, side), vec3_add(vec3_scale(f->facing, RUN_TUCK_BACK * s), vec3(0.0f, RUN_TUCK_UP * s, 0.0f))); Vec3 drive = vec3_add(vec3_add(f->position, side), vec3_add(vec3_scale(f->facing, RUN_DRIVE_AHEAD * s), vec3(0.0f, RUN_DRIVE_UP * s, 0.0f))); float u = foot->step, m = 1.0f - u; diff --git a/entropie/src/people/body_internal.h b/entropie/src/people/body_internal.h index 44ecbd8..bf1d892 100644 --- a/entropie/src/people/body_internal.h +++ b/entropie/src/people/body_internal.h @@ -18,7 +18,7 @@ #define SHIN 0.42f #define ANKLE_Y BODY_ANKLE_Y #define FOOT_LENGTH 0.15f -#define FOOT_X 0.10f +#define FOOT_X 0.085f #define SPINE 0.36f #define NECK 0.17f #define HEAD_UP 0.12f @@ -154,6 +154,8 @@ enum { #define WRIST_RADIUS 0.04f #define PALM_RADIUS 0.035f #define LEG_RADIUS 0.05f /* thigh and shin, kept clear of things */ +#define KNEE_FOLLOWS_FOOT 0.45f /* the knee points this much the way the foot does, the rest straight ahead ... */ +#define KNEE_OUT -0.12f /* ... and this much out (+) or in (a little in: no bow legs) */ #define KNEE_OUT_MOST 1.4f /* radians a knee may swing out round the leg ... */ #define KNEE_OUT_STEPS 7 #define KNEE_IN_MOST 0.5f /* ... or in (radians) */ diff --git a/entropie/src/people/body_pose.c b/entropie/src/people/body_pose.c index 403e95f..fce93a3 100644 --- a/entropie/src/people/body_pose.c +++ b/entropie/src/people/body_pose.c @@ -692,7 +692,7 @@ static void solveStanding(Body *b, Vec3 position, Vec3 facing, float s, float dt shy: knees in a little */ Vec3 fd = vec3(tip.x - target.x, 0.0f, tip.z - target.z); fd = vec3_length(fd) > 0.02f ? vec3_normalize(fd) : vec3(0.0f, 0.0f, 1.0f); - Vec3 pole = vec3_add(fd, vec3(sign * (0.06f - 0.3f * shy), 0.0f, 0.15f)); + Vec3 pole = vec3_add(vec3_scale(fd, KNEE_FOLLOWS_FOOT), vec3(sign * (KNEE_OUT - 0.3f * shy), 0.0f, 1.0f - KNEE_FOLLOWS_FOOT + 0.15f)); /* (straight ahead mostly: toes out don't make bow legs) */ pole.y += 0.8f * b->pull_knees; pole.x += sign * 0.35f * b->pull_knees; /* (getting up onto something: the knee comes up, not into it - and not into the other) */ twoBone(j[hip], target, THIGH, SHIN, pole, &j[hip + 1], &j[hip + 2], false);