Could I get some information about saving game data?

For a persistent world, should I be manually tracking all actors created or modified during gameplay for saving, or is there a ‘quick save’ kind of feature that can take care of tracking what existed in the map before and what needs to be saved now?

#Custom Binary Save System Tutorial

I provide full code for saving any arbitrary game data you want to compressed (ZLIB) binary files :slight_smile:

#Wiki tutorial

A new, community-hosted Unreal Engine Wiki - Announcements - Unreal Engine Forums,Read%26_Write_Any_Data_to_Compressed_Binary_Files

Rama

Thank you Rama, that is a very good reference (and I will likely make extensive use of it soon enough), though I’m looking for information on how to properly manage the data that needs to be saved before the actual saving part.

For instance, if the game is saved while an axe is flying through the air, I would expect it to be flying through the air at the same velocity when I re-load the game, or if an actor is spawned in a level streaming volume and that level is unloaded during save, I would expect it be be there once I re-load the save and activate the streaming volume.

I think a good start for me would be to have these questions answered:

  1. Should I iterate through all the actors in the world and save them to the archive?

  2. Can the save game somehow know which map was loaded and how to re-load it? Or is this a manual process?

  3. When loading the save game, will it ‘overwrite’ an actor if it already exists, or will it create a duplicate.

So far, I’m getting a compile error in my header file claiming that FArchive is an unrecognized type. This is happening despite having the following in my header’s include statements:

#include "Serialization/ArchiveBase.h"

Did I get the include statement wrong? FTR, this is in 4.6.1. It’s a bummer because I’m trying to see if I can eventually use Rama’s save system to implement a full-scale quick save system that uses the UPROPERTY macro’s SaveGame keyword to serialize game data.

"So far, I’m getting a compile error in my header file claiming that FArchive is an unrecognized type. "

Go into YourGame.h

and change

#include "EngineMinimal.h"

to

#include "Engine.h"

And then you’ll be set :slight_smile:

Rama