A downloadable tool


Overview

A slot-based save/load pipeline that serializes player state and inventory, reloads the correct scene, and applies saved data deterministically on scene load.

Key points

  • Save slots (multiple independent saves)

  • JSON serialization into per-slot storage

  • Scene restore via saved levelIndex

  • Player state restore (position, health, inventory counts)

  • Defensive checks (no save from main menu, slot existence validation)

Architecture Overview

SaveSystem (core)

 ├─ Save(slot) → snapshot + JSON serialize

 ├─ Peek(slot) → read/deserialize without applying

 ├─ Load(slot) → (optional) apply global state

 └─ Delete(slot)

LoadMenu / SaveMenu (UI glue)

 ├─ SaveMenu.SaveToSlot(slot) → SaveSystem.Save(slot)

 └─ LoadMenu.Load(slot) → sets load_slot + SceneManager.LoadScene(levelIndex)

GameManager (runtime apply)

 └─ OnSceneLoaded() → reads load_slot + SaveSystem.Peek(slot) → applies state to Player


Execution Flow

INTERACT (consume key) → SAVE SNAPSHOT → SERIALIZE → WRITE SLOT → LOAD SLOT → LOAD SCENE → APPLY STATE ON SCENE LOADED


Code Highlights

A) Save snapshot & serialization: <strong>SaveSystem.Save()</strong>


View full implementation → SaveSystem.cs

https://github.com/VelardLugossian/gameplay-systems-portfolio/blob/main/src/SaveSystem.cs

B) Load flow & scene restore: <strong>LoadMenu.Load()</strong>

View full implementation → LoadMenu.cs
https://github.com/VelardLugossian/gameplay-systems-portfolio/blob/main/src/LoadMenu.cs

C) Applying loaded state: <strong>GameManager.OnSceneLoaded()</strong>

View full implementation → GameManager.cs
https://github.com/VelardLugossian/gameplay-systems-portfolio/blob/main/src/GameManager.cs

D) Gameplay proof (key consumption): DoorSystemKey.Interact()

View full implementation → DoorSystemKey.cs

https://github.com/VelardLugossian/gameplay-systems-portfolio/blob/main/src/DoorSystemKey.cs


*      *      *


Go back →Gameplay Systems Portfolio – Velard (Main)

https://velard.itch.io/portfolio-gameplay