TutorialsSave data

Tutorial: Save Data

Save data stores progress for the current player and current game. Signed-in players use cloud save; guests use browser local storage.

Store progress

from conjure import *
from conjure.platform import save_data, load_data
 
coins = load_data("coins", 0)
coins += 1
save_data("coins", coins)

Use small JSON values

Keys should be short and stable. Values must be JSON-serializable and small. Store numbers, strings, booleans, lists, or dictionaries instead of large blobs.

Reset or inspect

Use list_save_keys() when debugging and reset_save_data() when the game offers a clear reset action.

What next

Combine saves with leaderboards and read the platform API.