How do I save progress to the computer?

Okay, so I’ve been making a 25-level platformer, and I’ve gotten everything finished, except for ONE DAMN THING. How the heck do I save progress? I’ve got all the variables from the level select screen, such as IsLevel2Unlocked and such, but I wanna save them so that players can leave the game and come back. But how?

Try these:

2 Likes

I did, Yhac10, before I posted this. But I only got even more confused

Ideally you want to get all your variables in a global structure variable (so it’s accessible from any scene) and save that to storage.

To do this, the structure variable will need to be parsed into a string and in JSON format. Luckily there’s a one-line action that does this.

Then to read it back, the JSON formatted string needs to be read in and parsed back into a variable. Again, there are a couple of actions that do this.

Here’s a simple example of how to read and write the data to storage.

1 Like