April 3rd 2020 by SDGNelson

4.20.5.0 update focused on saving and loading game state.

Persistence Overview

While there are definitely bugs still lurking, the foundations for saving and loading are relatively functional in the beta now:

Save Game Menu

Much more level state is persisted than in the original game. For example items manually placed in the level editor are only spawned once, and dropped items are (finally) safe between loads.

There are three types of local saves:

Each level has a quicksave slot. Press F5 to quicksave and F9 to quickload.

On top of that each level has an autosave slot. This is usually the default when loading a map, and saved to periodically and when exiting.

Manual save slots can be created and deleted to preserve a point in time.

Dedicated servers configure savedata through an ini file, and have key features like timed autosaves.

Build Machine

My poor laptop has been chugging away for years compiling and building updates to Unturned and Unturned II. During community member HoldBaker's New Year Horde Mode event I could not patch a bug they ran into because it would take too long to build. Thankfully a proper dedicated build machine has been assembled, and the laptop can rest. This new machine blazes through updates 13x faster!

Persistence Implementation

Lots of planning and refactoring went into this save system the past few weeks. While there are a few aspects I am not completely happy with yet, here are the key interesting decisions: