Rolly Docs

Autosave and save checkpoints

Save the game on a timer and at moments you choose, keep the last few autosaves, and save checkpoints a player can retry from at once.

Sheet
02 of 64
Rev
1.0.0
Updated
On this sheet

Turn autosave on

In Project Settings > Plugins > Rolly Save > Autosave, set Autosave Interval above 0. It is 0 by default: an autosave nobody asked for costs a hitch and three files.

Setting Default Does
Autosave Interval 0 Seconds between autosaves, at least Minimum Interval when above 0. 0: no timer, requests still save
Minimum Interval 10 The shortest interval, Start Autosave’s too; at least 1
Autosave Slots 3 (1 to 99) Autosaves kept, in autosave_1 and up; each new one replaces the oldest
Minimum Gap 30 Requests this many seconds after any save to storage are dropped
Autosave After Map Change off Autosave once each map opened by travel begins play; the first map and a load’s own map are left out
Maps Without Autosave none Maps where nothing autosaves, such as your menu and loading maps
Autosaves Write To Own Slot Own Slot: the autosave slots. Current Slot: the slot last saved or loaded by name

The timer runs on the server or in a standalone game, in game worlds outside Maps Without Autosave. Every save to storage, a manual one too, starts it over, so the player never gets an autosave right after saving. Pausing the game stops it.

Autosave at moments of your game

Call Request Autosave with a Reason, such as BossDefeated, where your game reaches a safe moment. The log says why an autosave was dropped: within Minimum Gap of the last save to storage, after Stop Autosave, on a client, or in a map without autosave. Tick Ignore Minimum Gap, among the node’s advanced pins, for a moment that must save even right after another save, such as the end of a story chapter. To autosave when the player enters an area, see Place save points, checkpoints and reset areas. During a load, seamless travel or a save block the autosave waits and runs once the game can save again; requests meanwhile make no second autosave. An autosave into the autosave slots that a load or a map change overtakes between its capture and its write is not written, and ends with Busy.

Stop Autosave turns the timer and requests off for the session, such as during a cutscene, and Start Autosave turns them on again; its Interval Seconds above 0 replaces Autosave Interval for the session.

On Save Finished fires for autosaves too, with Result’s Kind Autosave, so a “Saving…” notice can tell them apart.

Where autosaves go

  • The autosave slots: each autosave takes the next number and goes to autosave_1, autosave_2 and so on, then replaces the oldest. The numbers decide, never the save times, so a device clock set back does not replace the newest autosave. List Rolly Slots shows them with Kind Autosave.
  • The current slot: with Autosaves Write To at Current Slot, autosaves write the slot the game last saved or loaded by name (Get Current Slot), for games with one save per playthrough. Until there is one, they use the autosave slots. Set Current Rolly Slot names it before the first save, such as when a new playthrough starts; it returns false during a run and for quick, the autosave slots and checkpoint.
  • A run’s slot: during a single-slot run, every autosave writes the run’s slot (see Play single-slot runs).

autosave_1 to autosave_99 and checkpoint are Rolly Save’s own: saving, copying, renaming or importing into them fails with Invalid Input and a setup message.

Save and load checkpoints

  1. Call Save Rolly Checkpoint at a checkpoint, with a Checkpoint Name such as Bridge (None, or 1 to 128 characters). It saves the whole game into the memory slot checkpoint and into the storage slot checkpoint; with Project Settings > Checkpoints > Checkpoints Write To at Current Slot, into the current slot instead.
  2. Call Load Rolly Checkpoint when the player dies or retries. While the session holds the memory copy, it loads from memory and reads no storage; after a restart it loads from storage.
  • A checkpoint during a save block waits and saves when the last block goes; when several waited, the newest saves and every node that waited gets its result.
  • A whole-game load from storage and New Game+ drop the memory copy, since it belongs to the game played before; Load Rolly Checkpoint then reads storage.
  • Slot lists show Kind Checkpoint and the Checkpoint Name. During a run, checkpoints write the run’s slot and keep no memory copy.

From C++

Save->RequestAutosave(TEXT("BossDefeated"));
Save->RequestAutosave(TEXT("ChapterEnd"), /*bIgnoreMinimumGap*/ true);
Save->StopAutosave();
Save->StartAutosave(60.0f); // every 60 seconds for this session

Save->SaveCheckpoint(TEXT("Bridge"));
Save->LoadCheckpoint(ERollySaveLoadMap::OpenSavedMap, [](const FRollySaveResult& Result) {});
C++