Skill Game Dev →

Game State Persistence

Unity 6 game save/load system local file (JSON/MemoryPack binary), cloud sync (Apple…

A secure, versioned save/load system for Unity 6 games covering local files, cloud sync, schema migration, and optional anti-cheat encryption. It replaces the deprecated, RCE-prone BinaryFormatter with zero-alloc MemoryPack or readable JSON, adds AES-256-GCM plus HMAC integrity, and recovers from corruption through checksums and backup rotation. Cross-device sync ships for Apple GameCenter, Google Play Games, and Steam with explicit conflict resolution.

$15 one-time
Add to a kit →

Prices include 20% VAT. · Forged on real agency work · one-time, no lock-in

  • Type Skill
  • Category Game Dev
  • Delivery Email · instant
  • License One-time
Run preview
forgehouse, game-state-persistence

Inside the run · no black box

See the actual work before you buy it.

Player progress has three enemies: crashes, cheaters and device switches. Saves get zero-alloc binary serialization, AES encryption with HMAC signatures, atomic writes with automatic backup fallback, and schema migrations that never skip a version.

  1. Defines the GameSave schema with an explicit schemaVersion field and serializes it with MemoryPack (zero-alloc binary, roughly 3-5x faster than JSON). BinaryFormatter is banned outright: Microsoft deprecated it and it carries a remote code execution risk through untrusted save files.
  2. Wraps the payload in defense layers: AES-256-GCM encryption for content, then an HMAC-SHA256 signature so a tampered or hand-edited save is rejected before deserialization, with the HMAC compared in constant time.
  3. Writes atomically: payload goes to a .tmp file, gets flushed to disk, then renames over the live save while the previous file rotates into a backup. A crash mid-write leaves either the full old save or the full new one, never a half-written file.
  4. On load, verifies HMAC and parses; if the primary save is corrupt it falls back to the backup automatically and tells the player a previous backup was restored. Silently starting a new game is forbidden.
  5. Migrates schemas strictly in sequence: a v1 save passes through v1-to-v2 then v2-to-v3, each step filling new fields with defaults. Skipping a migration step is banned because it loses data.
  6. Debounces autosave with a 5-second quiet window and async writes so saving never blocks a frame, and resolves cloud sync conflicts by timestamp; when timestamps tie, the player chooses between devices in a dialog because automatic merging risks losing real progress.
Use cases · what happens when you plug it in

One power source. 6 lines out.

game-state-persistence · core

core active · 6 lines

  1. Persisting character level, inventory, and quest progress across sessions

    ✓ persisting character level
  2. Syncing save data across devices via iCloud, Play Games, or Steam Cloud

    ✓ syncing save data across
  3. Migrating save schemas safely when a game update adds or renames fields

    ✓ migrating save schemas s…
  4. Encrypting saves to block resource-hack cheating

    ✓ encrypting saves to block
  5. Recovering gracefully from a corrupted save instead of crashing or starting over

    ✓ recovering gracefully from
  6. Throttling autosave to stop frame drops from frequent writes

    ✓ throttling autosave to s…
Benefits · what you walk away with

Yours to keep.

Drag time forward. Watch what stays.

Forever

That's what owning means.

The rented stack

ai writing tool: subscription

expired · access lost

analytics suite: subscription

expired · access lost

design platform: subscription

expired · access lost

(nothing left)

Your forge

  1. Protect players from progress loss: the single biggest driver of game churn

    license: perpetual
  2. Close a real RCE security hole by retiring BinaryFormatter for safe serialization

    license: perpetual
  3. Keep saves fast and small with zero-alloc binary that cuts cloud bandwidth

    license: perpetual
  4. Make cross-device handoff trustworthy with conflict dialogs instead of silent data loss

    license: perpetual

subscriptions expire · deeds don't

What's included · the full manifest

Everything in the box.

Pick a piece up. Watch it work.

Atomic save pipeline with MemoryPack, AES-256-GCM encryption, and HMAC signing

part 01 of 06 · in the box

6 parts · one working system · ships instantly by email

Who it's for

This wasn't forged for everyone.

  • Not for you if you'd rather rent a tool than own one.
  • Not for you if you want someone else to run your stack.
  • Not for you if you're happy guessing.
Still here? Good.

Unity game developers who need a robust, tamper-resistant, cross-device save system without the security and corruption risks of naive persistence.

then this was forged for you.

Works with

Universal by design: these run in any AI. Delivered in the open Agent Skills + MCP format (native in Claude); ChatGPT, Gemini, Cursor and Copilot adapt the same files their own way.

  • Claude Native format
  • ChatGPT Adapts via open standards
  • Gemini Adapts via open standards
  • Cursor Adapts via open standards
  • Copilot Adapts via open standards
Questions · still in the air

Catch what's on your mind.

the air is clear. nothing between you and the forge.
catch a spark: the forge will answer

  1. My game ships on Steam and mobile, does cloud sync cover both?

    Yes. It includes per-platform guidance for Apple GameCenter, Google Play Games, and Steam Cloud, with explicit conflict resolution based on timestamps and version vectors instead of silent overwrites.

  2. Couldn't I just roll my own save system with PlayerPrefs or JSON files?

    For trivial data, sure. What this adds is the failure handling that bites later: atomic writes, checksum-based corruption recovery with backup rotation, sequential schema migration, and AES-256-GCM with HMAC integrity, while steering you away from the deprecated, RCE-prone BinaryFormatter.

  3. Does encryption make saves completely cheat-proof?

    No. AES-256 plus HMAC blocks casual save-file editing, but a determined attacker on their own device can always dig deeper. Server-authoritative validation sits outside this package's scope.

  4. How is it delivered?

    By email right after purchase: ready to run, downloaded instantly, no setup wait.

  5. One-time or subscription?

    A one-time purchase; no subscription or hidden fees. VAT (20%) is included.

  6. Can I get a refund?

    As a digital product, it can’t be refunded once downloaded. That’s why we show exactly what’s inside and who it’s for, right here.