Back to all docs
Player state

Cloud, Progress, and Economy

Save data, load data, unlock achievements, update quests, and record economy transactions.

cloudachievementsquestseconomywallet

Cloud data

The cloud namespace mirrors saveData, loadData, and deleteData with names that read naturally in game code. Use storage:save for writes and storage:read for reads.

Save and load
await QubizSDK.requestPermissions(["storage:save", "storage:read"]);

await QubizSDK.cloud.save("slot-1", {
  checkpoint: "tower-door",
  hp: 7
});

const save = await QubizSDK.cloud.load("slot-1");
console.log(save.status, save.value);

Achievements and quests

Achievements represent durable unlocks. Quests represent progress toward an objective. Keep ids stable so players do not lose progression when a build changes.

Progress APIs
await QubizSDK.requestPermissions([
  "achievements:write",
  "quests:write"
]);

await QubizSDK.achievements.unlock({
  id: "first-clear",
  title: "First clear"
});

await QubizSDK.quests.update({
  id: "daily-run",
  objectiveId: "finish-rounds",
  progress: 3,
  completed: false
});

Economy API

Use the economy namespace for in-game wallet reads and currency/item transactions. The current host keeps this lightweight and status-driven; payment-backed entitlements should still use the payment flow.

Wallet and transaction
await QubizSDK.requestPermissions(["economy:read", "economy:write"]);

const wallet = await QubizSDK.economy.getWallet();

await QubizSDK.economy.transact({
  currency: "coins",
  amount: 120,
  reason: "level_reward",
  metadata: { stage: "world-2" }
});