Skip to content

Cloud Saves

Cloud Saves let players save their game state to the server and restore it on any device. Quest Data automatically handles versioning and conflict resolution.

See the SDK Cloud Saves guide for GDScript integration with save_game(), load_game(), and conflict handling.

# Save current game state
var save_data = {
"level": 5,
"health": 100,
"inventory": ["sword", "shield", "potion"],
"playtime_seconds": 3600
}
var save_id = await QuestData.save_game(save_data, {
"device": "mobile",
"timestamp": Time.get_ticks_msec()
})
print("Save uploaded: " + save_id)
# Load latest save
var save = await QuestData.load_game()
if save != null:
level = save["level"]
health = save["health"]
inventory = save["inventory"]
else:
# No save found, start new game
start_new_game()
# Load specific version
var old_save = await QuestData.load_game("save_v5")

Every save creates a new version. Dashboard shows all versions with:

ColumnShows
Versionsave_v1, save_v2, etc.
TimestampWhen it was saved
DeviceWhere it was saved from
SizeBytes of save data

If a player has multiple saves from different devices:

  1. Latest timestamp wins by default
  2. Or manually select which save to keep
  3. Previous saves are archived (not deleted)
# Get all available saves for manual selection
var saves = await QuestData.list_saves()
# Player picks which version to use
var chosen = saves[0]
await QuestData.restore_save(chosen["id"])

If the server is unreachable:

  1. SDK saves to local disk
  2. When connection restored, uploads queued saves
  3. Server detects duplicates, keeps latest
# This works even offline
await QuestData.save_game(data) # Queued locally
# Later, when online, automatically uploads
  1. Go to Players > Cloud Saves
  2. Search for a player
  3. View all their save versions
  4. See creation date, device, size
  5. Download/restore manually if needed
Terminal window
# Save game
curl -X POST "https://api.questdata.io/v1/saves" \
-H "x-game-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"player_id": "player123",
"data": {"level": 5, "health": 100},
"metadata": {"device": "mobile"}
}'
# Load latest save
curl "https://api.questdata.io/v1/saves/player123?latest=true" \
-H "x-game-api-key: YOUR_API_KEY"

Response:

{
"id": "save_v3",
"player_id": "player123",
"data": {"level": 5, "health": 100},
"created_at": "2026-04-06T10:30:00Z",
"device": "mobile"
}