First slice: PD-muscle humanoid ragdoll on Ymir's SoA world #2

Merged
nibu merged 2 commits from nibu/first-slice into main 2026-11-10 17:16:57 +00:00
Member

Rung 1 of the Bad Day Simulator ladder, Lodur half: a humanoid active ragdoll with PD muscles on Ymir's Box3D SoA world. Layer 5 only; layers 1-4 are not coded. Needs Ymir PR (draft, stacked on GameCult/Ymir#1) checked out as ../Ymir on nibu/soa-joints.

What is here: Lodur.Core (netstandard2.1, no references): PdMuscle, per-muscle strength. Lodur.Body.Ymir: 13 bodies, 12 joints (capsule limbs, box trunk and feet, sphere head, ball joints and hinges), Drive(strengths, targets) writes equal and opposite torques onto the world's torque lanes; strength and target arrays belong to the caller; a tick allocates nothing. docs/first-slice.md has the measurements and limits.

Measured (Linux x64, Debug native, one machine; 21 tests pass): stands through a seeded shove for 1.5 s (head 1.73 m of 1.74; about 2 s in exploratory runs), then topples because there is no balance controller; with zero strength it falls and the trunk rests inside 6 s (extremities can keep rocking: a head resting on an arm chattered at up to about 3.5 rad/s for 10 s in one seed, bounded in the test, not claimed still); one limp knee stops tracking its target while the other follows; same seed gives the same FNV-1a hash of every lane at 14 checkpoints, other seeds and one changed strength element differ. Hand-run mutants: swapping child and parent torque, ignoring fractional strength, and giving a hinge swing gains each fail a test.

Not measured: Windows, Unity consumption (unrun); cross-platform and cross-process bit-identity (unclaimed); Release native build. Gains are tuned by running (explicit PD through torque lanes goes unstable when damping times the step exceeds the inertia; the hips and spine had to drop to 3 and 4). Stiff ankles for real balance need joint springs or motors in Ymir. CultMath not used: the core carries its own small Quat.

Merge nothing.

🤖 Generated with Claude Code

Rung 1 of the Bad Day Simulator ladder, Lodur half: a humanoid active ragdoll with PD muscles on Ymir's Box3D SoA world. Layer 5 only; layers 1-4 are not coded. Needs Ymir PR (draft, stacked on GameCult/Ymir#1) checked out as `../Ymir` on `nibu/soa-joints`. **What is here**: `Lodur.Core` (netstandard2.1, no references): `PdMuscle`, per-muscle strength. `Lodur.Body.Ymir`: 13 bodies, 12 joints (capsule limbs, box trunk and feet, sphere head, ball joints and hinges), `Drive(strengths, targets)` writes equal and opposite torques onto the world's torque lanes; strength and target arrays belong to the caller; a tick allocates nothing. `docs/first-slice.md` has the measurements and limits. **Measured** (Linux x64, Debug native, one machine; 21 tests pass): stands through a seeded shove for 1.5 s (head 1.73 m of 1.74; about 2 s in exploratory runs), then topples because there is no balance controller; with zero strength it falls and the trunk rests inside 6 s (extremities can keep rocking: a head resting on an arm chattered at up to about 3.5 rad/s for 10 s in one seed, bounded in the test, not claimed still); one limp knee stops tracking its target while the other follows; same seed gives the same FNV-1a hash of every lane at 14 checkpoints, other seeds and one changed strength element differ. Hand-run mutants: swapping child and parent torque, ignoring fractional strength, and giving a hinge swing gains each fail a test. **Not measured**: Windows, Unity consumption (unrun); cross-platform and cross-process bit-identity (unclaimed); Release native build. Gains are tuned by running (explicit PD through torque lanes goes unstable when damping times the step exceeds the inertia; the hips and spine had to drop to 3 and 4). Stiff ankles for real balance need joint springs or motors in Ymir. CultMath not used: the core carries its own small `Quat`. Merge nothing. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Lodur.Core: engine-free PD law with per-muscle strength. Lodur.Body.Ymir: 13-body, 12-joint ragdoll
driven through the world's torque lanes from caller-owned strength and target arrays. Tests: stand, fall,
rest, per-muscle strength, torque conservation, no allocation, same seed gives the same state hash.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
nibu changed title from Draft: First slice: PD-muscle humanoid ragdoll on Ymir's SoA world to First slice: PD-muscle humanoid ragdoll on Ymir's SoA world 2026-11-10 17:16:56 +00:00
Author
Member

Steward check before merge (nibu, 2026-11-10). Its dependency, Ymir's SoA joints, merged to Ymir main first.

  • Applies to main: 0 commits behind, mergeable.
  • dotnet test tests/Lodur.Tests with YMIR_ROOT at Ymir main (7ba31c3): 21/21 pass.
  • Falsification: (a) making the parent torque += instead of -= (torque conservation) fails 6 tests; (b) flipping the swing-damping sign in the PD law fails 7 tests.
  • Fixed the stale dependency note (README and Directory.Build.props named branch nibu/soa-joints, which is now Ymir main) in a follow-up commit.
  • Not verified here: Windows/Release/second-process determinism, which the PR's own doc already declares unclaimed.
  • Merged.
Steward check before merge (nibu, 2026-11-10). Its dependency, Ymir's SoA joints, merged to Ymir main first. - Applies to main: 0 commits behind, mergeable. - `dotnet test tests/Lodur.Tests` with `YMIR_ROOT` at Ymir main (7ba31c3): 21/21 pass. - Falsification: (a) making the parent torque `+=` instead of `-=` (torque conservation) fails 6 tests; (b) flipping the swing-damping sign in the PD law fails 7 tests. - Fixed the stale dependency note (README and Directory.Build.props named branch `nibu/soa-joints`, which is now Ymir main) in a follow-up commit. - Not verified here: Windows/Release/second-process determinism, which the PR's own doc already declares unclaimed. - Merged.
nibu merged commit 0764cfc909 into main 2026-11-10 17:16:57 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
GameCult/Lodur!2
No description provided.