Rolly Docs

Keep snapshots in memory

Save the whole game into memory for the session, such as before a boss for a quick retry, and rewind to the last few points you saved, without writing to storage.

Sheet
19 of 64
Rev
1.0.0
Updated
On this sheet

Save and load a memory slot

  • Save Game to Rolly Memory Slot saves the whole game into the memory slot Slot Name, such as BeforeBoss. Nothing is written to storage.
  • Load Game from Rolly Memory Slot loads it, with Map as Load Game from Rolly Slot takes it: Open Saved Map opens the map it was saved in, Keep Current Map sets the values on the objects that exist now.
  • Get Memory Slots lists the memory slots and rewind points, newest first, with the metadata a slot list shows (see Show saves in a slot list); Kind is Memory or Rewind.
  • Delete Memory Slot removes one. A save to it that is still running does not bring it back.

Memory slots belong to the game instance: travel keeps them, Clear Loaded Game drops them all, and each Play In Editor player has its own. Names follow the rules of slot names, so BeforeBoss and beforeboss are one slot. checkpoint and rewind_1 to rewind_99 are Rolly Save’s own: a save to them fails with Invalid Input and a setup message.

Rewind

  1. Call Save Rolly Rewind Point at the moments a player may want to go back to, such as each room entered or each turn.
  2. Call Rewind Rolly Game with Steps: 1 loads the newest point, 2 the one before it. The points newer than the one loaded go.

Rewind Rolly Game fails with Not Found when there are fewer points than Steps, and with Invalid Input for Steps below 1. A whole-game load from storage drops every rewind point, since they belong to the game played before it.

Set how many are kept

In Project Settings > Plugins > Rolly Save > Memory Slots:

Setting Default Keeps
Memory Slots 8 (1 to 64) Memory slots; past it, the oldest goes once a new one is written
Rewind Points 5 (1 to 99) Rewind points; past it, the oldest goes

Each costs about twice its save’s size in memory, since it keeps two copies as storage does. A memory save captures the game in one frame, as every save does, so save at moments the player does not notice, such as a door or a checkpoint, rather than on a short timer.

Memory saves and rewind points are saves: a save block refuses them with Blocked (see Block saving during a fight), and only the server or a standalone game makes them.

From C++

Save->SaveToMemory(TEXT("BeforeBoss"));
Save->SaveRewindPoint();
Save->Rewind(1, ERollySaveLoadMap::KeepCurrentMap, [](const FRollySaveResult& Result) {});

FRollySaveLoadRequest Request;
Request.SlotName = TEXT("BeforeBoss");
Request.bFromMemory = true;
Save->Load(Request);
C++