Memory storage in Android device.

Hi everyone, I am new to GDevelop, please help!
I am creating a 2D platformer game in GDevelop for Android. I have created 30 different scenes for 30 different levels. Now, when the user leaves the game/app without completing all 30 levels ( which he/she probably would) , the user has to restart the whole game again on the next run. How can I store the information (such as the level he left off from) so that the app can retrieve the information and continue from where the user left off on the next run?

Did you try the storage actions?, never exported to Android, but storage should work. If so, you can save the last level number when exit or after each run, and read the value at the beginning of the game to change the scene from the saved number :slight_smile:

I tried out the storage options. But it asks for a file to store the information into. Which file should I use?

Any file, for example “save.sav”, the file will be stored in the browser web storage, locally for you application, so don’t worry about the path, a simple filename should work :slight_smile:

Is it necessary for the file to be ending with .sav ?

No, it’s just that I’m used to have files with extensions, a filename withouth extension as “save” will work too.

He Lizard-13, it seems that we cannot test the value in a file at the beginning of the game.

Didn’t work?, try a simple example to check out.

Where can I find an example?

I meant to say that you could make a little example to try out :slight_smile: . Anyway I’ve made one, it works in native (compilation and preview) and HTML5, try it out with Android:
BasicSave.gdg (9.73 KB)

Thanks, Lizard-13! Your code helped helped a lot!