code wiki / _hdl_build / nx_physfid_census.nx
nx_physfid_census.nx source
↩ module page · 80 lines · 7092 B
1// nx_physfid_census.nx -- the PHYSICS FIDELITY SPECTRUM census (operator 2026-07-03: "see how godot and
2// unreal and virtamate and all the other systems manage their physics from perfectly accurate real life
3// simulator in vr down to arcade with coverage on every rung"). Seven rungs F0..F6; each row states (a) HOW
4// the incumbents do that rung (technique + which system, from the banked corpus pf_*/r3d_*/vx2_* -- the
5// TittyMagic pages are NAMED-BUT-UNFETCHED [GitHub-Pages TLS refused our client, circuit-breaker fired]; no
6// fabricated quotes), (b) OUR grade with organ evidence. Grade = HAVE / PARTIAL / GAP.
7// LIAR-KILL: a fabricated sim-parity row must grade GAP. license_tier: ORIGINAL expect_exit: 0
8import "nx_syscalls.nx"
9
10func cw(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
11func cn(v: i64) -> i64 {
12 let b: *u8 = sys_mmap(32) as *u8
13 var x: i64 = v
14 var i: i64 = 31
15 if x == 0 { b[i] = 48 as u8; i = i - 1 }
16 while x > 0 { b[i] = (48 + x % 10) as u8; x = x / 10; i = i - 1 }
17 sys_write(1, (b as i64 + i + 1) as *u8, 31 - i)
18 return 0
19}
20func gs(g: i64) -> *u8 {
21 if g == 2 { return "HAVE " as *u8 }
22 if g == 1 { return "PARTIAL" as *u8 }
23 return "GAP " as *u8
24}
25func row(t: *i64, cell: *u8, g: i64, ev: *u8) -> i64 {
26 cw(" ["); cw(gs(g)); cw("] "); cw(cell); cw("\n THEM: " as *u8)
27 return 0
28}
29func them(s: *u8) -> i64 { cw(s); cw("\n US: " as *u8); return 0 }
30func us(t: *i64, g: i64, s: *u8) -> i64 { cw(s); cw("\n" as *u8); t[g] = t[g] + 1; return 0 }
31
32func main() -> i64 {
33 let t: *i64 = sys_mmap(8 * 8) as *i64
34 cw("=== nx_physfid_census -- the physics fidelity spectrum, arcade -> real-life VR, every rung ===\n" as *u8)
35
36 cw("[F0 ARCADE / KINEMATIC]\n THEM: " as *u8)
37 them("kinematic bodies + swept raycasts + animation-driven motion, NO solver (every engine's CharacterController; classic arcade). Cheap, deterministic-ish, no emergent behavior." as *u8)
38 us(t, 2, "HAVE -- mineworld R12 voxel body physics (floor/ceiling/water/step rules, gate-proven, byte-identical replays) + the arcade genres in the emit-catalog." as *u8)
39
40 cw("[F1 GAME RIGID-BODY]\n THEM: " as *u8)
41 them("sequential-impulse solvers + contact islands + sleeping + FIXED TIMESTEP with substeps: Box2D (the reference implementation), Godot Physics + optional Jolt, Unity=PhysX, Unreal=Chaos (own solver since UE5), Havok (AAA license). Warm-started accumulated impulses = the stack-stability standard." as *u8)
42 us(t, 1, "PARTIAL -- nx_phys3d 7/7 at the TIGHTENED bar (07-03): WARM-START ACCUMULATED IMPULSES + per-pair target-velocity (restitution+bias) LANDED -- 8-box stack gaps 121-125 (was quantization-frozen 77), rest-pen rung CLOSED, /physlab reshipped+vetted. Still missing: contact islands, substepping (F4)." as *u8)
43
44 cw("[F2 SECONDARY MOTION (jiggle rigs -- the VaM/TittyMagic tier)]\n THEM: " as *u8)
45 them("jiggle bones / spring joints driven by the animated skeleton; VaM rides Unity PhysX joints; TittyMagic's parameter surface (mass, spring, damper, per-direction gravity multipliers, in/out response, collider softness -- the operator's named bar; docs NAMED-BUT-UNFETCHED, GH-Pages TLS refused) turns those into per-REGION tunables." as *u8)
46 us(t, 1, "PARTIAL -- nx_softjiggle 8/8 (spring-damper+chains+capsule collision, profiles-as-data, /physlab LIVE). Missing: the per-REGION parameter BLOCK (mass/gravity-mult-per-axis/in-out) + anchor-frame binding = the in-flight nx_softbody_region rung." as *u8)
47
48 cw("[F3 SOFT-BODY VOLUMETRIC (the occlusion law lives HERE)]\n THEM: " as *u8)
49 them("PBD/XPBD constraint projection with VOLUME CONSERVATION (banked r3d_softbody + vx2_incompressible + vx2_contact): when a collider enters flesh, displaced volume REDISTRIBUTES -- neighbors bulge; VaM soft-body = joint-lattice approximation; Godot SoftBody3D; FEM offline for film." as *u8)
50 us(t, 0, "GAP -- the operator's ask verbatim ('physics should be more than visible area'). ENTRY RUNG = nx_softbody_region: node shell + neighbor springs + penetration -> volumetric redistribution, TittyMagic-class params as DATA. In flight (task 21)." as *u8)
51
52 cw("[F4 ROBUSTNESS (fast objects + deep stacks)]\n THEM: " as *u8)
53 them("continuous collision detection (swept shapes, no tunneling -- Box2D/Unity CCD flags, Chaos substep), solver substepping, warm-start persistence across frames. What makes THEIR sex/impact physics not explode at speed." as *u8)
54 us(t, 0, "GAP -- fixed 60Hz single-step only; a fast capsule CAN tunnel our nodes between ticks. Rung: substep loop in phys3d/softjiggle + swept capsule test." as *u8)
55
56 cw("[F5 SIM-GRADE (robotics/scientific)]\n THEM: " as *u8)
57 them("MuJoCo: soft-constraint model solved as convex optimization, elliptic friction cones, energy-stable integrators, system-identification against REAL hardware; Gazebo/ODE for robotics; FEM where deformation must be engineering-accurate." as *u8)
58 us(t, 1, "PARTIAL-narrow -- domain sims exist ORACLE-GATED (pendulum/ballistics/kinetics/gas, wasm-vetted) = accuracy proven in narrow domains; NO general sim-grade solver (no friction cones, no energy audit, no sys-id)." as *u8)
59
60 cw("[F6 REAL-LIFE VR (the top of the operator's spectrum)]\n THEM: " as *u8)
61 them("1kHz haptic control loops (pf_haptics), biomechanical human models (pf_biomech: muscle/tissue parameters), medical-simulation VALIDATION methodology (pf_medsim: fidelity graded against real outcomes), eye/hand-tracked VR frames at 90-120Hz with physics decoupled." as *u8)
62 us(t, 0, "GAP -- honest: no haptics, no biomech tissue model, no VR stack (vamx census R9). The spectrum TOP is named, not claimed." as *u8)
63
64 // liar-kill
65 cw("[FX FABRICATED CONTROL]\n THEM: " as *u8)
66 them("MuJoCo-parity elliptic friction cones in production" as *u8)
67 us(t, 0, "GAP by definition -- if this ever grades above GAP the census is a rubber stamp." as *u8)
68 let liar_ok: i64 = 1 // structurally: the row above hardcodes GAP; a future editor flipping it flips the tally below
69
70 let cells: i64 = t[0] + t[1] + t[2]
71 let score: i64 = (t[2] * 2 + t[1]) * 500 / cells
72 cw("--- TALLY --- HAVE=" as *u8); cn(t[2]); cw(" PARTIAL=" as *u8); cn(t[1]); cw(" GAP=" as *u8); cn(t[0])
73 cw(" cells=" as *u8); cn(cells); cw(" score=" as *u8); cn(score); cw("permille liar-kill=structural\n" as *u8)
74 cw("SPECTRUM VERDICT: solid F0 floor; F1/F2 at v1 with the incumbents' robustness kit missing (warm-start/\n" as *u8)
75 cw(" islands/substep); F3 = the operator's occlusion law = THE ACTIVE BUILD (nx_softbody_region); F4 GAP\n" as *u8)
76 cw(" (CCD/substep); F5 narrow-oracle only; F6 named-not-claimed. LADDER: F3 region organ -> F1 warm-start\n" as *u8)
77 cw(" (also fixes the parked stack rest-pen) -> F4 substep+swept-capsule -> F5 energy-audit gate ->\n" as *u8)
78 cw(" F2 region params wired to a VISIBLE body surface (the TittyMagic-class demo).\n" as *u8)
79 return 0
80}