Create a Persistly project and copy the stage runtime key.
Quickstart
From runtime key to first saved game.
Use a stage key while building, configure the SDK once, write the default autosave data locally, and add sync when the player reaches a safe moment.
Shortest Path
This is the canonical startup flow.
Keep the first pass narrow: project key, SDK install, local-first data write, then sync policy.
Install the SDK for your game surface.
Configure PersistlyGameSaves with local storage.
Save locally first, then call due-sync or force-sync at safe gameplay moments.
First Save
The JavaScript path starts with PersistlyGameSaves.
This is the only code sample you need on the quickstart page: configure, save one default game save, load it, and force-sync when safe.
import { PersistlyGameSaveStatus, PersistlyGameSaves } from "@persistlyapp/sdk";
await PersistlyGameSaves.configure({
runtimeKey: "ps_test_replace_me",
});
const loaded = await PersistlyGameSaves.shared.loadData();
if (loaded.status === PersistlyGameSaveStatus.LocalFound && loaded.data) {
console.log("Boot from local data:", loaded.data);
} else {
console.log("Start new game.");
}
// Local write. This does not need a network request.
await PersistlyGameSaves.shared.saveData({
level: 5,
coins: 1200,
checkpoint: "forest-gate",
}, {
slotInfo: { characterName: "Astra", slot: "main" },
});
// First sync creates a Persistly account + slot if needed.
const sync = await PersistlyGameSaves.shared.forceSyncData();
if (sync.status === PersistlyGameSaveStatus.Synced) {
console.log("Synced to Persistly.");
}
if (sync.status === PersistlyGameSaveStatus.Conflict) {
console.log("Show a local-vs-cloud recovery UI.");
}Branch Next
Choose what to read after the first save works.
Understand saveData/loadData first, then move to saveSlot/loadSlot when you need multiple saves.
Read the flowSDK hubPick JavaScript, Unity, Godot, or a tracked future integration path.
Open SDKsDashboard walkthroughCreate projects, copy keys, inspect environments, and review recent saves.
Open dashboard guide