Module persistence

Source
Expand description

Versioned, bounded first-party save data. Checksums detect corruption, not tampering. No filesystem, browser or game-specific dependencies.

Structs§

Document
PreferenceOverrides
Sparse, device-local overrides of Preferences, with one slot per field.
Preferences
Device-local presentation preferences, separate from gameplay control bindings.
Record
RecordBook
RecordDelta
Comparison of an attempted value with its previous best, before acceptance.
RecordSummary
Independent score/time comparisons for one accepted or previewed attempt.

Enums§

RecordComparison
An attempt’s relation to the previous best for one metric.
SaveError
Value

Constants§

MAX_FIELDS
MAX_RECORDS
MAX_RUN_US
MAX_SAVE_BYTES

Traits§

SaveData
Implement explicit older-version migration in read(); reject newer versions. Decode into a temporary value and validate it before returning to the host.

Functions§

checksum
run_micros
Convert a bounded finite game timer without accepting NaN/negative/zero runs.