diff --git a/docs/first-slice.md b/docs/first-slice.md index 48a9a1b..ff4ff7e 100644 --- a/docs/first-slice.md +++ b/docs/first-slice.md @@ -33,7 +33,7 @@ Ymir's structure-of-arrays world. Nothing above layer 5 exists yet. ## Not measured, or limits found -- Cross-platform bit-identity: unclaimed. Windows (2026-11-19, no MSVC): builds and passes with MinGW gcc, `CMAKE_GENERATOR="Ninja Multi-Config" CC=gcc`; MinGW names the DLL `libymir_box3d.dll` where `Ymir.Box3D.csproj` expects `ymir_box3d.dll`, so copy it to the unprefixed name in `artifacts/box3d-native/production/Debug/bin/Debug` until Ymir emits that name. Test classes that build worlds must not run in parallel there (two live worlds crashed the host). Unity consumption: unrun. One machine, Debug +- Cross-platform bit-identity: unclaimed. Windows (2026-11-19, no MSVC): builds and passes with MinGW gcc, `CMAKE_GENERATOR="Ninja Multi-Config" CC=gcc`; Ymir 0b0321a emits `ymir_box3d.dll` under MinGW, so no rename is needed, and its world create/destroy lock makes test classes safe to run in parallel (before it, two live worlds crashed the host). Unity consumption: unrun. One machine, Debug native build only; no Release run, no run in a second process. - Explicit PD through torque lanes limits stiffness and damping: damping times the step must stay under the inertia it acts on. Hips and spine went unstable at damping 15 and 20 and are set to 3 and 4; the gains diff --git a/src/Lodur.Body.Ymir/AssemblyInfo.cs b/src/Lodur.Body.Ymir/AssemblyInfo.cs deleted file mode 100644 index 4b4cdac..0000000 --- a/src/Lodur.Body.Ymir/AssemblyInfo.cs +++ /dev/null @@ -1 +0,0 @@ -[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("Lodur.Tests")] diff --git a/src/Lodur.Body.Ymir/HumanoidRagdoll.cs b/src/Lodur.Body.Ymir/HumanoidRagdoll.cs index bfe39f3..8289dd3 100644 --- a/src/Lodur.Body.Ymir/HumanoidRagdoll.cs +++ b/src/Lodur.Body.Ymir/HumanoidRagdoll.cs @@ -4,7 +4,7 @@ using Ymir.Box3D; namespace Lodur.Body.Ymir { /// The ragdoll's joints, in strength-array and target-array order. - internal enum Muscle + public enum Muscle { Spine, Neck, ShoulderL, ShoulderR, ElbowL, ElbowR, HipL, HipR, KneeL, KneeR, AnkleL, AnkleR } @@ -16,7 +16,7 @@ namespace Lodur.Body.Ymir } /// The ragdoll's bodies, also the limb label written into the world's limb lane. - internal enum Limb + public enum Limb { Pelvis, Torso, Head, UpperArmL, UpperArmR, LowerArmL, LowerArmR, ThighL, ThighR, ShinL, ShinR, FootL, FootR } @@ -25,10 +25,10 @@ namespace Lodur.Body.Ymir /// A 13-body humanoid built in a caller-owned Ymir SoA world (invariant one-physics-world): capsule limbs, /// box pelvis, torso and feet, a sphere head, spherical joints at spine, neck, shoulders and hips, hinges at /// elbows, knees and ankles. Facing +z, left is +x, standing on y = 0 at the creation pose, which is also - /// every joint's zero. is the muscle layer: it turns caller-owned strengths and target + /// every joint's zero. The game owns the physics world: Build adds bodies to the caller's world and Lodur never creates or steps one. is the muscle layer: it turns caller-owned strengths and target /// rotations into torques on the world's torque lanes and does nothing else to the physics. /// - internal sealed class HumanoidRagdoll + public sealed class HumanoidRagdoll { public const int MuscleCount = 12; public const int LimbCount = 13; diff --git a/tests/Lodur.Tests/ConnectedPainBoxTests.cs b/tests/Lodur.Tests/ConnectedPainBoxTests.cs index 6a3002b..efe1255 100644 --- a/tests/Lodur.Tests/ConnectedPainBoxTests.cs +++ b/tests/Lodur.Tests/ConnectedPainBoxTests.cs @@ -73,7 +73,6 @@ internal sealed class ConnectedPainBox : IDisposable public void Dispose() => World.Dispose(); } -[Collection(NativeWorld.Name)] public sealed class ConnectedPainBoxTests { private static float Dist((float X, float Y, float Z) a, (float X, float Y, float Z) b) => diff --git a/tests/Lodur.Tests/NativeWorld.cs b/tests/Lodur.Tests/NativeWorld.cs deleted file mode 100644 index 5a22cbc..0000000 --- a/tests/Lodur.Tests/NativeWorld.cs +++ /dev/null @@ -1,14 +0,0 @@ -namespace Lodur.Tests; - -/// -/// Test classes that build Ymir worlds share this collection so xunit runs them one at a time: two native -/// Box3D worlds alive on different threads crashed the test host (0xC000001D) on Windows/MinGW, 2026-11-19. -/// This works around a Ymir defect (lodur:finding:cut-nervous-layers.s1.ymir-concurrent-world-create: world create and -/// destroy are not thread-safe). Remove this collection, and the attributes naming it, in the body commit after Ymir -/// merges its lock around world create/destroy. -/// -[CollectionDefinition(Name)] -public sealed class NativeWorld -{ - public const string Name = "native Ymir world"; -} diff --git a/tests/Lodur.Tests/RagdollTests.cs b/tests/Lodur.Tests/RagdollTests.cs index d70845e..0590a97 100644 --- a/tests/Lodur.Tests/RagdollTests.cs +++ b/tests/Lodur.Tests/RagdollTests.cs @@ -4,8 +4,6 @@ using Ymir.Box3D; namespace Lodur.Tests; -/// Native Ymir worlds are not created concurrently (see NativeWorld.cs). -[Collection(NativeWorld.Name)] public sealed class RagdollTests { private const float StandingHead = 1.74f;