Documentation
¶
Overview ¶
Package restore drives the crash-restore check: snapshot a running world, rebuild it in a fresh one, and compare.
This is the path a shard takes after a crash, and it is not the same path as physics2d.ResetRuntime on a live world. A restore round-trips every component through MarshalWire and UnmarshalWire, which for PhysicsBody2D means going through its custom UnmarshalJSON — the code that decides whether an absent field means "false" or "Box2D's default of true". Only a real snapshot exercises that.
Cardinal's own ordering is reproduced exactly: World.run calls world.Init() first, so the game's Init systems spawn a whole scene and the physics plugin builds a Box2D world from it, and only *then* does restore() call FromProto and throw that ECS state away. The C-side world is left describing a scene that no longer exists, which is why the plugin documents calling ResetRuntime after FromProto. Both variants are available here.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.