Saving your Game State to a File or the Preferences

To save the state of your game, you can either use the Preferences from LibGDX or save to your own file. That file could, for example, be a JSON or XML file.

JSON files are usually smaller and XML files allow more customization. For example, you may assign attributes to elements which is not possible in JSON. For more information, read this.

These videos may help you:

Request 16 (LibGDX) - encrypted Game Saves using JSON and Base64

Request 11 (LibGDX) - XML Parsing

Feedback and Knowledge Base