So I’m aware of these methods using the SaveGame Object in Blueprint or C++ :
https://docs.unrealengine.com/latest/INT/Gameplay/SaveGame/Code/index.html
That looks pretty decent, but can I use it to serialize things like all the game AI actors that have been spawned in the level into that SaveGame object? I’m not clear on how to use that to serialize the whole game state to a SaveGame object and the examples given are more like saving some .ini file variables to a single object rather than actual game state and game objects. What about saving ‘many’ objects to the SaveGame object? How would that be done?
On other forums, I read about using things like FArchiveProxy and serializing game objects to uint8 binary streams to read on and back off disk.
So…that said, can someone sort me out on the best strategy for saving a current game state to a save game file to be read back in.
To be clear about my intentions:
This means if I spawn a bunch of objects and actors, I have a player with inventory etc.and they are changing, taking damage (changing state) during gameplay, I then want to be able to call as SaveGame methods that serializes out a snapshot of the entire game state which can then be later read back in to reconstruct the game as exactly was when I saved.
So this means I’m not after a checkpoint type save system. This is more of a ‘save almost everything’ type of save game.
The closest thing to what I want would be this nice writeup on saving archive data streams to and from disk, and maybe that IS what I should do, but has anything been added to UE4 4.6 that makes this more outdated? I haven’t found it yet, but that doesn’t mean it’s not there.
A new, community-hosted Unreal Engine Wiki - Announcements - Unreal Engine Forums,Read%26_Write_Any_Data_to_Compressed_Binary_Files