Ballai Save System


Configurable file name, extension, directory, slot count, and schema version Temporary-file writes with optional backup recovery ... PBKDF2-SHA256 key derivation ... Unity Physics 2D


by Ballai


Price History +

Ballai Save System provides a tested, modular way to save player and world state, with slots, autosave, metadata, backup recovery, validation, and clean APIs for customization.

Key Features

  • Manual saving and loading
  • Multiple independent save slots
  • Autosaving with configurable debounce timing
  • Save metadata, timestamps, playtime, and current scene tracking
  • Persistent player and world-object state
  • Persistent collectibles, chests, doors, levers, and inventory examples
  • Stable persistent IDs with Editor validation
  • Duplicate ID detection that prevents unsafe saves
  • Automatic restoration of objects registered after loading
  • Backup recovery for missing or corrupted primary save files
  • Configurable save-file extension and storage directory
  • Optional encryption and integrity protection
  • Save schema and component data versioning
  • Migration support for future save formats
  • Public events for save, load, delete, slot, and autosave operations
  • Modular interfaces for custom storage, serialization, and protection
  • Three-slot interactive demo
  • Educational sample scripts and integration documentation
  • Automated EditMode and PlayMode test coverage

Details

  • Tested Unity version: Unity 6000.3.13f1
  • Language: C#
  • Full source code included
  • Runtime namespace: Ballai.SaveSystem
  • Render pipeline independent; no rendering-specific runtime dependency
  • Multiple independent save slots
  • Unity JSON serialization
  • File-based storage using Application.persistentDataPath
  • Configurable file name, extension, directory, slot count, and schema version
  • Temporary-file writes with optional backup recovery
  • Optional plaintext, HMAC-SHA256, or AES-CBC + HMAC-SHA256 protection
  • PBKDF2-SHA256 key derivation
  • Save schema migration API
  • Persistent scene-object IDs with duplicate validation
  • Replaceable serializer, storage, and data-protection interfaces
  • EditMode and PlayMode automated tests included
  • Domain Reload disabled Play Mode supported and tested
  • Demo scene and formatted in-Editor tutorial included
  • No paid or third-party runtime dependencies

Optional demo dependencies

  • Unity Input System
  • Unity UI
  • Unity Physics 2D
  • Unity Image Conversion

Unity Test Framework is required only for running the included automated tests.

Ballai Save System is a modular and extensible persistence framework for Unity. It provides multiple save slots, manual saving and loading, autosaving, metadata, persistent object IDs, backup recovery, schema versioning, and optional data protection through a clean C# API.

Game objects participate in saving through the lightweight ISaveable interface or the typed SaveableBehaviour<TState> base class. This makes it easy to persist player statistics, inventory, collectibles, interactables, enemies, quests, checkpoints, and other project-specific state without modifying the package source.

The framework is genre-independent and suitable for platformers, RPGs, adventure games, metroidvanias, simulations, and other single-player projects. Slot count, storage directory, file extension, autosave behaviour, protection mode, and schema version can be configured through a ScriptableObject settings asset and the Unity Inspector.

A complete interactive demo demonstrates player position, health, coins, inventory, collectibles, a chest, lever, door, hazard, autosaving, and three independent save slots. Runtime, Editor, sample, integration, and test code are separated into dedicated assemblies for easier maintenance and integration.

Optional protection modes include HMAC-SHA256 integrity checking and AES-CBC + HMAC-SHA256 encryption with PBKDF2-SHA256 key derivation. These features are designed to discourage casual save-file editing and detect tampering or corruption. As with any client-side protection, they should not be treated as authoritative anti-cheat or server-side security.