One Save: start here for idle, casual, prototype, and small single-save games.
Template Center
Pick a template by SDK and game shape.
One-save first, slots next, account restore after that. These templates keep examples account-first and facade-first so game code does not start from raw runtime endpoints.
SDK
Choose the SDK you are integrating.
Each SDK page includes one-save, multi-slot, and account restore variants with copyable starter code.
Browser games, Vite apps, and JavaScript engine wrappers using @persistlyapp/sdk.
Open JS templatesUnityUnity games using PersistlyGameSaves and engine-friendly async save helpers.
Open Unity templatesGodotGodot games using the Persistly addon facade and GDScript examples.
Open Godot templatesGame Shape
Start with the smallest save shape that fits.
The templates are ordered from easiest to most explicit: one current save, named slots, then signed-in account restore.
Use saveData, SaveDataAsync, or save_data for a single current save.
See exampleMultiple SlotsUse stable slot ids for manual saves, campaigns, or character selection.
See exampleAccount + SlotsRestore known accounts with explicit account sessions from your own trusted account system.
See exampleMultiple Slots: use this when players choose saves, campaigns, characters, or manual slots.
Account + Slots: add this when your own sign-in system restores a Persistly account session across devices.
Rules
These templates keep beginner integrations on the public facade.
Keep normal game code on the PersistlyGameSaves facade.
Write local save data first, then sync from deliberate lifecycle or gameplay moments.
Export account sessions only when your trusted account system needs cross-device restore.