Skip to main content

Crate repame_sim

Crate repame_sim 

Source
Expand description

Headless sim: bevy_ecs world stepped without a renderer. Game owns Sim, feeds wall time via Sim::step, then reads a snapshot for the viewport.

Determinism stance: bevy_ecs query iteration follows entity allocation history, so a replay with an identical spawn history iterates identically. The sim does NOT sort systems’ iteration for you: any gameplay outcome that depends on iteration order (damage application, projectile-vs-multiple-enemies resolution) must sort explicitly in the affected system, or replays diverge the moment allocation history does. Cross-platform float equality (notably Perlin/sin/powf in fx) is additionally not guaranteed between native libm and wasm; same-binary replay is the supported claim, cross-target equality needs a harness (run one trace twice, hash the world per tick, diff).

Re-exports§

pub use bevy_ecs;

Structs§

Sim
Fixed-step sim state. Game registers systems, feeds wall time with step, reads world for the snapshot.
SimTime
Sim time, advanced once per fixed step.