Skip to content

v0.4.2: record, replay, scrub

Latest

Choose a tag to compare

@Stink-O Stink-O released this 09 Aug 02:11
· 8 commits to main since this release

Recording gets a player. This release turns 0.4.1's recording API into a full record-and-replay workflow in the demo, closes the editor-experience gap with native gizmos, and fixes everything found in a week of live testing.

Record and replay, with a timeline

The timeline is very early and still needs iteration. It works, and everything below is measured, but expect rough edges in its UI and behaviour, and expect it to change shape in coming releases.

  • Record any sample from the sidebar: a whole session from step 0, or from the moment you press the button. Everything you do to the world is captured, fired balls, bombs and their blasts, grab-drags, because the recording is the world's own mutation log.
  • A draggable timeline scrubs the result in both directions, plays it backwards, single-steps either way, and shows a buffer band plus a live percentage while it indexes in the background. Spacebar toggles play.
  • Reverse playback does not re-simulate: displayed frames are cached as 20-byte quantised transform rows, so scrubbing a 16,000-body pyramid collapse backwards costs well under a millisecond a frame once indexed. Recordings bigger than the 96 MB memory budget spill to a session temp file (deleted on close) and stay scrubbable end to end; seeks into unsimulated territory keep the UI responsive with a progress readout.
  • Replays look like the scene you recorded. A small sidecar next to the recording captures each body's colour (including vertex-coloured materials, averaged in linear light) and material response; the .b3rec itself stays byte-identical to upstream's format. No sidecar means the neutral look, so old and upstream recordings still play.
  • Stopping a recording is instant: the capture is amortised across the session and the file writes happen on a background thread, with a visible saving state. On the heaviest scene in the demo the click went from a 114 second freeze to under 10 ms.
  • Replaying at a different worker count re-checks the embedded state hashes, which makes the timeline a live cross-thread determinism harness. The Wave Pile sample demonstrates it, replaying bit-identically at 1, 2, 4 and 8 workers on desktop. Determinism on the web build remains unverified.

Editor and binding

  • In-editor gizmos for every collider type and all nine joints, drawn in upstream's own debug palette. A hinge shows its axis and limit arc in the editor viewport before you press play; hulls re-hull the authored cloud so the outline is exactly what the solver gets.
  • Debug shells in the demo's debug view now cover convex hulls, height fields and fitted meshes, not just primitives and triangle meshes.
  • The last developer-facing globals are bound: Box3DWorld.dump_memory_stats(), get_box3d_version(), is_double_precision().

Demo

  • Four new samples (69 total): Wave Pile (Determinism), Box Hull and Hull Reduction (Geometry), Far Stack (World).
  • The sample picker groups by category with a submenu each and marks the sample you are on; the touch picker mirrors it with collapsible sections.
  • Bombs now work in every sample: the blast auto-calibrates to scenes authored at upstream's body density, verified to leave all previously working samples byte-identical. A crash when exploding near dynamic triangle-mesh bodies is guarded sample-side; the underlying null-deref is upstream's and has been written up for filing.
  • Spinning Stick now walks upstream's own XorShift32 generator instead of a frozen Godot RNG draw, so it settles where the og sample app settles. The Wrecking Ball's crane actually hangs over its rope and the wall starts at rest.

The headless selftest suite grew from 442 to 709 assertions this release, all green, plus the 69-sample suite and a dedicated replay performance rig.

Assets

Same layout as 0.4.1: Linux/Android/Windows libraries (debug and release), both web builds, the debug-signed demo APK, and both browser-demo zips. The threaded web zip is what the itch.io page runs; the single-threaded zip suits plain static hosts. Windows DLLs are MinGW cross-builds, verified to import only KERNEL32 and msvcrt, and remain untested on Windows itself.