Save System

How to work with the GS_Play save system — saving game state, loading saves, and tracking progression with the Record Keeper.

The Save system handles all persistence in a GS_Play project. The Save Manager coordinates file operations, Savers serialize per-entity state, and the Record Keeper tracks flat progression data. Together they give you a complete save/load pipeline that works out of the box and extends cleanly for custom data.

For architecture details, component properties, and extending the system in C++, see the Framework API reference.

Save Manager component in the O3DE Inspector

 

Contents


How Saving Works

Save System Pattern Graph

Breakdown

When a save is triggered, the Save Manager broadcasts OnSaveAll to every Saver component in the scene. Each Saver serializes its entity’s relevant state into the save file. When loading, the Save Manager broadcasts OnLoadAll, and each Saver restores its entity from the save data.

The Save Manager also maintains a list of all save files with metadata (timestamps, names), so you can present a save/load UI to the player.

OperationWhat Happens
New saveCreates a new save file, broadcasts OnSaveAll to all Savers.
Load saveReads save file, broadcasts OnLoadAll to all Savers.
Save dataWrites current game state to the active save file.
Load dataReads data from the active save file into memory.

E Indicates extensible classes and methods.

Patterns - Complete list of system patterns used in GS_Play.


Responding to Save Events

ScriptCanvas

Connect to SaveManagerNotificationBus to know when save or load operations occur:


Triggering Saves and Loads

These methods are available on SaveManagerRequestBus:

ScriptCanvas NodeWhat It Does
NewGameSaveCreates a fresh save file for a new game.
LoadGame(saveName)Loads a specific save file by name.
SaveDataWrites current state to the active save file.
LoadDataReads the active save file into memory.
GetOrderedSaveListReturns all save files sorted by most recent.
ConvertEpochToReadable(epoch)Converts a save file timestamp to a human-readable string.

Record Keeper

The Record Keeper is a lightweight key-value store for tracking game-wide progression — quest flags, counters, unlock states, completion markers. It lives on the Save Manager prefab and is automatically persisted with the save system.

Unlike Savers (which are per-entity), the Record Keeper is a global singleton. Any script or component can read and write records by name.

ScriptCanvas NodeWhat It Does
HasRecord(name)Returns whether a record with the given name exists.
SetRecord(name, value)Creates or updates a record. Value is a float.
GetRecord(name)Returns the current value of a record.
DeleteRecord(name)Removes a record.

Responding to Record Changes

Listen on RecordKeeperNotificationBus for the RecordChanged event. This fires whenever any record is created, updated, or deleted — useful for UI that displays progression state.


Built-In Savers

Two Savers ship with GS_Core for the most common use cases:

SaverWhat It Saves
BasicEntitySaverEntity transform (position, rotation, scale).
BasicPhysicsEntitySaverEntity transform plus rigidbody velocity and angular velocity.

Add these components to any entity that needs to persist its position across save/load cycles. They handle serialization and restoration automatically.


Quick Reference

NeedBusMethod / Event
Trigger a saveSaveManagerRequestBusSaveData
Trigger a loadSaveManagerRequestBusLoadGame(saveName)
Create a new saveSaveManagerRequestBusNewGameSave
List all savesSaveManagerRequestBusGetOrderedSaveList
Know when savingSaveManagerNotificationBusOnSaveAll
Know when loadingSaveManagerNotificationBusOnLoadAll
Check a progress flagRecordKeeperRequestBusHasRecord(name) / GetRecord(name)
Set a progress flagRecordKeeperRequestBusSetRecord(name, value)
Know when a record changesRecordKeeperNotificationBusRecordChanged

Glossary

TermMeaning
SaverA component that serializes one entity’s state into the save file
Record KeeperA global key-value store for tracking progression flags and counters
Save FileA serialized snapshot of all Saver data plus Record Keeper state

For full definitions, see the Glossary.


See Also

For the full API, component properties, and C++ extension guide:

For step-by-step project setup:


Get GS_Core

GS_Core — Explore this gem on the product page and add it to your project.