carnage

A gore framework for Bevy built the other way round: the blood is a material, the bone breaks the way it was loaded, and every visual is deterministic enough to hash. Ten demos, each one thing, each running in your browser.

⚠ Vibe Coded. Written by an AI agent working from a human's direction. It is used in a shipping game and covered by tests, but it has had no line-by-line human audit. Read it before you trust it. — These demos need WebGPU and a secure context: Chrome, Edge, or Safari 26+.

The demos

What is actually new here

Games treat blood as a decal with a lifetime and fracture as a shape-shattering operation. Both are reductions that throw away the thing a player can see. So each of these is modelled from the measurement instead:

IdeaWhat it changesSource
Blood is a shear-thinning yield-stress fluid A fast rivulet is thin and races; a flow stops where it is when its yield stress overtakes the drive. Clotting is that, not a timer. Carreau–Yasuda with Cho & Kensey's constants
Fracture knows its loading mode Spiral, butterfly, transverse, comminuted — and greenstick, which is an outcome rather than a mode. 10.1145/3549540 §6 names the gap; 10.3233/BME-1991-1102, 10.1016/j.forsciint.2021.110899 fill it
Fragment count from the energy A faster load makes smaller pieces, cubically, and the energy delivered caps how much surface can exist. 10.1063/1.329934, 10.1098/rspa.1947.0042
Stains derived, not authored Four baked splats picked by seed % 4 repeat by the fourth stain, 90.6 % of the time. A derived stain repeats only when the impact does. 10.1520/jfs2003224, 10.1111/j.1556-4029.2007.00505.x
A wetmap that is CPU-authoritative Everywhere else this is a GPU render target, which is why nobody can hash one. This one has a digest.
Reduction is substitution Turning gore down keeps the hit confirmation and swaps the palette. Deleting the channel makes a game harder to read. ESRB / PEGI descriptors; WCAG 2.1 SC 2.3.1 for the flash gate

The crates

CrateWhat it isLicence
bevy_carnage Deterministic runtime gore: prefracture with loading-mode morphology, bullet bores, wounds, bond-graph severance, hit feel, and the tone/accessibility policy surface. MIT OR Apache-2.0
bloodstain Blood as a material — engine-free, no_std, no math library in its public API. Rheology, percolation spatter, stain morphology, the forensic pattern taxonomy, drying, and an inverse solver that reads the wound back out of the stains. MIT OR Apache-2.0
bevy_wetmap Texture-space blood accumulation, CPU-authoritative and therefore hashable. MIT OR Apache-2.0
bevy_viscera XPBD Cosserat-style strands with a tearing mesenteric membrane. MIT OR Apache-2.0