Checkpoints
Rotating recovery points a player can fall back to, written through the same verified pipeline as any other save.
What a checkpoint is#
A checkpoint is an ordinary save in its own slot. That is the whole design: because it is a normal save, it inherits staging, verification, backup and recovery without a second code path that could rot.
var checkpoints = new CheckpointService(slots, options.Checkpoints, clock, diagnostics);
var created = await checkpoints.CreateAsync(saveStateSource); // a recovery point, now
var listed = await checkpoints.ListAsync(); // oldest first, with labels
await checkpoints.PruneAsync(); // rotation, on your termsRotation that cannot cost the player#
| Setting | Default | Meaning |
|---|---|---|
SlotPrefix | checkpoint | Slots are named checkpoint-0001, and so on. |
MaxCount | 5 | How many rotating checkpoints are kept. |
MinimumInterval | 1 s | Stops a loop from creating an absurd number of them. |
The oldest checkpoint is deleted only after a newer one has been written safely. A failing checkpoint can therefore never cost the player the previous one — the write that matters is already on disk before anything is removed.
When to take one#
- before a risky transition (a chapter boundary, a long cutscene, a boss gate);
- after a large, deliberate state change that the player would not want to repeat;
- on a schedule the game controls, for players who expect automatic safety nets.
Next#
- Autosave — the automatic half of the same idea.
- Backups — the per-slot previous versions.
- Save slots — how checkpoint slots look in a listing.
Something wrong on this page? Every page here describes behaviour that is checked in the repository. If a page and the package disagree, the package wins.
Report a documentation problem · Frequently asked questions · Troubleshooting