← Todos os modelos

Gravações com versão, gravação automática, sincronização na nuvem, recuperação de gravações corrompidas.

Spec — Save system

Status: draft · Created: 2026-11-10

1. Context and goal

Players never lose progress: the game saves often, keeps saves readable across updates, syncs them between devices and recovers when a save file is damaged.

2. Functional requirements (EARS)

  • FR-1: THE SYSTEM SHALL write each save file with a format version number and a checksum of its content.
  • FR-2: WHEN a save from an older format version is loaded, THE SYSTEM SHALL migrate it to the current version without losing progress, for every version released in the last 2 years.
  • FR-3: WHEN the player reaches a checkpoint, and at least every 5 minutes of play, THE SYSTEM SHALL autosave without a frame taking longer than 33 ms.
  • FR-4: THE SYSTEM SHALL write a save to a temporary file and replace the previous one only after the write completes, so a crash leaves the last good save intact.
  • FR-5: THE SYSTEM SHALL keep the last 3 autosaves alongside the manual save slots.
  • FR-6: IF a save fails its checksum, THEN THE SYSTEM SHALL load the newest valid save instead and tell the player which save was restored.
  • FR-7: WHEN the player is online, THE SYSTEM SHALL upload a new save to the cloud within 30 seconds and download a newer cloud save at launch.
  • FR-8: IF the local and cloud saves both changed since the last sync, THEN THE SYSTEM SHALL show both with their play time and date and let the player choose.

3. Out of scope

  • Sharing save files between players.
  • Editing saves outside the game.