Expand description
What made a record or a save: the engine’s version, the game’s word
for its build, and a fingerprint of the content it ran on (Made).
A record played back by another build can play differently without a
bug in either; its stamp tells that apart from a desync.
A game stamps its own save or record with a made: Made field, filled
by Made::new when it is written (the fingerprint is the shipped
bundle’s, shuyi_assets::bundle::Bundle::fingerprint, computed once
and kept). After reading one back it calls Made::check with this
build’s stamp: what to do with a Mismatch is the game’s (play on,
warn, refuse). A field #[serde(default)] of Option<Made> keeps
older files without one readable.
The engine’s version (ENGINE_VERSION) moves only at a release. A
game pinned to a git revision of the engine that wants that revision
in its stamp puts it in the game’s word ("my-game 1.2.0 engine 3f2a1c9").
Structs§
- Content
Hash - A fingerprint of a game’s content: the same bytes give the same one on
every platform. Shown, and written to a file, as sixteen lowercase hex
digits, as a
StateHashis shown (a string, since JSON can’t hold everyu64). - Differs
- One part that differs between two stamps.
- Made
- What made a record or a save: the engine, the game’s build and the content it ran on, as the module docs say.
- Mismatch
- How a stamp differs from this build’s (
Made::check): each part that differs, in the order engine, game, content. Shown asmade with engine 0.1.0, content 1a2b3c4d5e6f7a8b; this build: engine 0.2.0, content 3c4d5e6f7a8b9c0d. - NotA
Hash - Text that isn’t a
ContentHash: sixteen hex digits.
Enums§
Constants§
- ENGINE_
VERSION - The engine’s version: every
shuyi-*crate has the workspace’s.