- C# 99.6%
- Shell 0.4%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
A goal that is voluntary (past its InvoluntarySeconds) writes each muscle at HoldStrength x min(1, Will^WillCurve + leak x FlinchGain); an involuntary one writes HoldStrength. PoseBehaviour.Write takes the weight first and throws outside [0, 1]; targets (Blend) are unchanged. DriveParameters.WillCurve (default 0.25) is validated in the Actor constructor. Body tests re-pinned, with the reason: - seed-1 replay: break tick 1770, switch tick 1782 and 16 flinches are unchanged; the arm's track and world hash moved (hand e283e3615b6b2cbc -> a0fafe85c80e98f7, world cd1902f3dd65af64 -> 83155f2abf0e7e91) because the hold now weakens as resolve falls. Renamed from "pre_brain_base". - "the movement is the leak": a leak-free arm now also sags as the will fails, and loses the last flinch (1750 ms) because it leaves the box sooner. The leak is isolated with WillCurve 0.001 (weight ~1), the claim unchanged; a new test pins the sag itself. The golden table is untouched. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> |
||
| docs | ||
| src | ||
| tests | ||
| tools/pain-box-golden | ||
| .gitattributes | ||
| .gitignore | ||
| Directory.Build.props | ||
| Lodur.slnx | ||
| README.md | ||
Lodur
A physics character middleware for characters that feel and react: they pull back from something hot, jump when poked, and, if they want their objective badly enough, crawl toward it after losing a leg.
Status: layers 1-3 and a layer-4 stand-in run on a PD-muscle ragdoll on Ymir. The
design is docs/lodur-target.md; read it first. Lodur.Core
holds perception, the withdrawal reflex, the drive state and a hold-against-reflex
stand-in, run per character by Actor; Lodur.Body.Ymir is the PD-muscle active ragdoll
on Ymir's Box3D SoA world (docs/first-slice.md, measured and
unmeasured). Behaviour selection beyond the stand-in, impairment and the learned tracker
are not coded.
Entry points: src/Lodur.Core/Actor.cs (one character's nervous state, one tick per
physics step), src/Lodur.Core/PdMuscle.cs (engine-free PD law, strength per muscle),
src/Lodur.Body.Ymir/HumanoidRagdoll.cs (the ragdoll, Drive and ReadRegions),
tests/Lodur.Core.Tests (the layers and parity with the pain box; builds without Ymir),
tests/Lodur.Tests (stand, fall, rest, same-seed-same-hash, and the connected pain box:
ConnectedPainBoxTests). The map this was cut from is
docs/connect-rungs-map.md. Needs a sibling Ymir checkout at
main (the SoA joints merge, 2026-11-10, or later); dotnet test tests/Lodur.Tests builds
its native library with cmake.
The problem
Active-ragdoll middleware (NaturalMotion's Euphoria, RootMotion's PuppetMaster) and learned physics controllers (DReCon, ProtoMotions) solve the body: physics, pose tracking and, in the learned case, balance. None of them models the nervous system. They have no senses that are not forces, no reflexes layered under deliberate behaviour, and no character whose pain competes with its will over time. Lodur is that layer.
Shape (planned)
- Core (C#, no engine references): perception, reflexes, a drive state of pain, shock, adrenaline and resolve that evolves every tick, and behaviour selection that turns the drive into targets plus muscle strength.
- Body (per engine): follows those targets on the engine's own articulated physics. v1 is a PD-tracking active ragdoll on Ymir; v2 adds a small learned tracker for upright balance behind the same interface.
First consumer
Bad Day Simulator, a 3D physics sandbox.
Where it lives
Canonical: https://eureka.gamecult.org/forge/GameCult/Lodur. GitHub
GameCult/Lodur is a push mirror.
Prior-art research:
gamecult-ops/docs/research/euphoria-at-home-prior-art.md.