O'Reilly logo

SFML Blueprints by Maxime Barbier

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

Adding data persistence to the game

If, like me, you can't imagine a game without a save option, this part couldn't interest you more. In this final part of the book, I will introduce you to the persistence of data. Data persistence is the ability of a program to save its internal state for future restoration. This is exactly what a save option does in a game. In our particular case, because the client received data directly from the server, all the jobs have to be done on the server part. First of all, let's think a bit about what we need to save:

  • The entities and their components
  • The teams
  • The games

We then need a way to store that data to be able to restore it later. The solution is to use files or something else that can grow with time, as easy ...

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