O'Reilly logo

Mastering Game Development with Unreal Engine 4 - Second Edition by Matt Edmonds

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a save game file

As noted at the top of this section, our actual game and the state of all our dynamic actors is done in three major steps:

  1. Add an interface to all actors that need to save. This involves a few changes to our moving platform, which we'll try to keep straightforward.
  2. Serialize all our actors' desired variables to an FArchive by tagging our UPROPERTIES.
  3. Write this to a file we can then serialize everything back out from.

For very simple saving (such as player stats and the current level), be sure to check out the USaveGame document link in the Further reading section at the end of the chapter. Now, on to our relatively complex version.

First we need an interface that we'll add to all of our actors that we care about ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required