makepad/libs/box3d/tests
Admin 409991483f box3d (snapshot): freed contact slots and the pair set's empty slots are no longer written in full (SNAP_VERSION 2) -- the contact array and the broad phase's pair set never shrink, so after a burst of pairs (effect physics spawning a pile of bodies: 600 overlapping pieces left 52 498 contact slots and a 131 072-slot pair set) every snapshot carried each freed slot's whole record (~200 bytes) and every empty set slot. A freed contact slot is now its id marker and generation (create_contact resets every other field, nothing reads a free slot but its id and generation; restored as destroy_contact leaves it), and the pair set writes its capacity and the occupied slots as (index, key, hash) (removal clears slots to (0, 0), so the restored set is identical slot for slot; indices must ascend within the capacity, anything else is refused as corrupt). The image layout changes, so old images are refused by the version check; images are made and read in-process only (effect-sim checkpoints, Sandbox's RigidDynamics clone, recording keyframes). The 600-piece pile: 20.2 MB -> 11.7 MB per image (the rest is 21k live contacts, real state). Checked: cargo test --release -p makepad-box3d (every suite green, incl. determinism and recording replay), tests/test_snapshot.rs with and without --features double-precision (new snapshot_of_freed_contacts_is_compact_and_exact: 300 pieces burst apart, 3843 live of 26 066 slots, the image within 16 bytes per slot + 800 per live contact, the restored world continues bit-identically while new bodies reuse freed contact ids); cargo test --release -p makepad-game-sim (all green: its clone is this round trip); cargo test --release -p makepad-effect-sim (seek == play, checkpoints restored through the new format).
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-30 13:39:48 +02:00
..
test_allocator.rs box3d: pure Rust port of Box3D (erincatto/box3d @ 29bf523) 2026-07-04 16:06:18 +02:00
test_bitset.rs box3d: pure Rust port of Box3D (erincatto/box3d @ 29bf523) 2026-07-04 16:06:18 +02:00
test_body.rs perf 2026-07-10 15:34:38 +02:00
test_body_query.rs box3d: SIMD (SSE2/NEON), double-precision large world, snapshots, benchmarks 2026-07-04 16:06:18 +02:00
test_collision.rs box3d: SIMD (SSE2/NEON), double-precision large world, snapshots, benchmarks 2026-07-04 16:06:18 +02:00
test_compound.rs box3d: pure Rust port of Box3D (erincatto/box3d @ 29bf523) 2026-07-04 16:06:18 +02:00
test_container.rs box3d: pure Rust port of Box3D (erincatto/box3d @ 29bf523) 2026-07-04 16:06:18 +02:00
test_determinism.rs box3d: opt-in broad-phase hybrid (parallel BVTT) — single-thread washer -19%, default off 2026-07-06 02:48:47 +02:00
test_distance.rs box3d: pure Rust port of Box3D (erincatto/box3d @ 29bf523) 2026-07-04 16:06:18 +02:00
test_height_field.rs box3d: pure Rust port of Box3D (erincatto/box3d @ 29bf523) 2026-07-04 16:06:18 +02:00
test_hull.rs box3d: pure Rust port of Box3D (erincatto/box3d @ 29bf523) 2026-07-04 16:06:18 +02:00
test_id.rs box3d: pure Rust port of Box3D (erincatto/box3d @ 29bf523) 2026-07-04 16:06:18 +02:00
test_joint.rs box3d: SIMD (SSE2/NEON), double-precision large world, snapshots, benchmarks 2026-07-04 16:06:18 +02:00
test_large_world.rs box3d: SIMD (SSE2/NEON), double-precision large world, snapshots, benchmarks 2026-07-04 16:06:18 +02:00
test_math.rs box3d: SIMD (SSE2/NEON), double-precision large world, snapshots, benchmarks 2026-07-04 16:06:18 +02:00
test_mover.rs box3d: pure Rust port of Box3D (erincatto/box3d @ 29bf523) 2026-07-04 16:06:18 +02:00
test_recording.rs box3d: recording replay player + test_recording port 2026-07-04 16:06:18 +02:00
test_recording_capture.rs box3d: recording op stream (capture side) 2026-07-04 16:06:18 +02:00
test_shape.rs box3d: pure Rust port of Box3D (erincatto/box3d @ 29bf523) 2026-07-04 16:06:18 +02:00
test_simd.rs box3d: SIMD (SSE2/NEON), double-precision large world, snapshots, benchmarks 2026-07-04 16:06:18 +02:00
test_smoke.rs box3d: SIMD (SSE2/NEON), double-precision large world, snapshots, benchmarks 2026-07-04 16:06:18 +02:00
test_snapshot.rs box3d (snapshot): freed contact slots and the pair set's empty slots are no longer written in full (SNAP_VERSION 2) -- the contact array and the broad phase's pair set never shrink, so after a burst of pairs (effect physics spawning a pile of bodies: 600 overlapping pieces left 52 498 contact slots and a 131 072-slot pair set) every snapshot carried each freed slot's whole record (~200 bytes) and every empty set slot. A freed contact slot is now its id marker and generation (create_contact resets every other field, nothing reads a free slot but its id and generation; restored as destroy_contact leaves it), and the pair set writes its capacity and the occupied slots as (index, key, hash) (removal clears slots to (0, 0), so the restored set is identical slot for slot; indices must ascend within the capacity, anything else is refused as corrupt). The image layout changes, so old images are refused by the version check; images are made and read in-process only (effect-sim checkpoints, Sandbox's RigidDynamics clone, recording keyframes). The 600-piece pile: 20.2 MB -> 11.7 MB per image (the rest is 21k live contacts, real state). Checked: cargo test --release -p makepad-box3d (every suite green, incl. determinism and recording replay), tests/test_snapshot.rs with and without --features double-precision (new snapshot_of_freed_contacts_is_compact_and_exact: 300 pieces burst apart, 3843 live of 26 066 slots, the image within 16 bytes per slot + 800 per live contact, the restored world continues bit-identically while new bodies reuse freed contact ids); cargo test --release -p makepad-game-sim (all green: its clone is this round trip); cargo test --release -p makepad-effect-sim (seek == play, checkpoints restored through the new format). 2026-09-30 13:39:48 +02:00
test_table.rs box3d: pure Rust port of Box3D (erincatto/box3d @ 29bf523) 2026-07-04 16:06:18 +02:00
test_task_system.rs box3d: external task-system hooks + makepad 3D example 2026-07-04 16:06:18 +02:00
test_world.rs box3d: SIMD (SSE2/NEON), double-precision large world, snapshots, benchmarks 2026-07-04 16:06:18 +02:00