Save Game Tutorial?

Hi. Learning how to save and load a game has been on my list for weeks, but I can’t find a good tutorial about this. It would be nice, if there was something for c++ (almost every tutorial uses blueprints), but more importantly: All I can find, including the official documentation, is about storing a couple of variables, but not an entire level (or its state).

I think a lot of people would like to know how to do a “classic” save-game as in Unreal 1, where every object in the world gets saved and loaded. Is there any info on this?

I wouldn’t know where to begin. If I use an approach where I iterate through all actors and serialize their relevant properties, there would still be the question how to deal with anything that’s part of the original level. For example, a certain enemy/box/whatever that was part of the level-file has been destroyed before saving. Now, afaik, I would first load or reset the level before loading the save-game later. Should I just destroy everything that’s not static, indestructible and immovable and then deserialize my array of objects from the save?

um somwhere in Time attack Racer turtorial (in blueprint, sorry) there is info about save game how to make one i think

In the video description it only says something about saving “best lap” and stuff. So that’s probably just about saving a couple of variables and not the state of an entire level and all actors in it.

(game-dev newb idea incoming)

I don’t know if the Level and “everything in it” is actually a serializable Object.
So you would have to gather all data into a Save object to serialize it but then comes the question: how to re-instantiate all of this? If you can organize all saveable objects and their properties in a tree you could cut off the leaves that don’t need to re-instantiate anymore. Laod all from there, or overwrite the Actors in the scene.

And that’s also how i would create a level. Tag all elements that needs to be saved and run a script that adds them to a tree. When the game is build all of the tagged entities get removed and initialized once the level loads or whatever event you prefer.

You kinda would have to “load” your level from that tree which holds all saveable information.

I would rather use checkpoints that save stuff until then or save-points than go through that hassle tbh.

So dynamic level entity loading and saving, if that makes sense to you.

Sidenote: I bet UE1 was not as complex as UE4 so much less data to save and load.

Well yes, that’s basically what I was thinking. But since this is probably a very commonly needed “feature”, I was hoping there is either some built-in functionality to use or at least some documentation or tutorials on how to implement this kind of thing.

And I don’t think Unreal 1 was any less complex in this regard. Every item’s and every enemy’s status, as well as world-elements like elevators and stuff, were saved with every save-game. That’s exactly what I want to do.