Skip to content

Save/Load Service: Blueprint architecture โ€‹

What/Why: Reliable saves without tangling logic; centralize in a GameInstanceSubsystem with async throttling.

Prereqs

  • Project Settings โ†’ enable SaveGame usage

Steps

  1. Create BP_SaveService (GameInstanceSubsystem)
  • Events: RequestSave(ProfileId), RequestLoad(ProfileId), OnSaved, OnLoaded
  • Internals: queue requests; Timer to process one at a time (avoid spikes)
  1. Define SaveGame classes (BP)
  • SG_PlayerProfile: progression, options
  • SG_WorldState: level streaming state, global flags
  1. Callers
  • On level transition or checkpoint, call RequestSave
  • On startup, call RequestLoad โ†’ broadcast loaded data
  1. Versioning
  • Use a SaveVersion int; if mismatch, run migration or defaults

Data

  • Keep references as IDs; resolve to data assets at runtime

Networking

  • Server-authoritative saves; clients request via RPC if needed

Performance

  • Compress large blobs only off the game thread (async blueprint nodes)

Testing

  • โ€œDirty flagโ€ changes trigger a queued save
  • Quit/restart โ†’ state restored properly

Suggested prompts โ€‹

  • โ€œUE 5.6 Blueprints only. Create BP_SaveService (GameInstanceSubsystem) with queued RequestSave/RequestLoad. Show events and timers to throttle saves.โ€
  • โ€œHow do I version SaveGame data with a SaveVersion int and migrate safely?โ€
  • โ€œOutline a test plan to validate save requests, throttle behavior, and load-on-startup.โ€
  • โ€œList pitfalls for save spikes and how to avoid blocking the game thread.โ€

Prompts for this example

  • โ€œProvide Blueprint nodes to enqueue a save on checkpoint and emit OnSaved when complete.โ€
  • โ€œShow how to load SG_PlayerProfile on startup and broadcast the data to interested systems.โ€