Break and Steal an EggOwner documentation← Portfolio

#Data & Persistence

GameCore.PlayerState holds a profile per player and publishes changes to server listeners and the client. The current store is BreakAndStealAnEgg_Player_v1, with schema/config version 1.

#Save lifecycle

StepBehavior
JoinGetAsync with up to 3 attempts, 2 seconds between retries
LoadMerge saved data with default values
AutosaveEvery 60 seconds
LeaveSave, then release the in-memory profile
ShutdownSaveAll during BindToClose, with a bounded wait

The profile contains Cash, Speed, owned equipment, pets, eggs, discoveries, upgrades, settings, statistics and processed receipts. Placed eggs save local pen coordinates as primitive tables; no raw Vector3 or instance is stored in that placement field.

#Temporary mode

When a load fails, the game creates a temporary profile and sets PersistenceMode to Temporary. Saves for that profile are suppressed, so the fallback does not overwrite the unknown persistent data that could not be loaded.

This lets you test gameplay with Studio API access disabled. It does not prove persistent saving works. Validate published rejoin behavior separately.

#Session safety limitation

The save callback currently writes an in-memory snapshot through UpdateAsync without a cross-server session lock or revision check. Two overlapping sessions can therefore overwrite one another's newer progress.

Before scaling the game, add session ownership/revision protection or migrate deliberately to a session-safe profile system. Do not describe the current implementation as already session locked.

#Replication and receipts

Each publish sends a copied full profile. This can become expensive as inventory and receipt history grow. The receipt tables are not currently bounded by an archival policy. If you implement pruning, preserve purchase deduplication and retry safety; simply deleting recent receipts can permit duplicate grants.

#Offline reward

Offline income uses the placed pets saved in the profile, a maximum of 28,800 seconds (8 hours), and an income rate of 0.5. The reward is stored as pending Cash and must be claimed. The double-reward flow requires its own configured developer product.

#Updating safely

Back up the place and test migrations on copies. Keep the same DataStore name to continue reading existing profiles; changing the name creates a different namespace. Validate old placed eggs, mutations, equipped pets and receipts after an update.