How do I have the game automatically save the players progress?

0 favourites
  • 4 posts
From the Asset Store
Players follower. use it for anything which follows the player
  • At the beginning of my game, all levels are locked except the first level. When the player beats the first level, the second level opens up, and so on. How do I make it so that when the player closes the app and reopens it, the second level is still unlocked? When the game is reopened, I want it start at the main menu again, but have its progress automatically saved/loaded (just like many other games). I don't want to have the player click a button to load it.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hey there! I unfortunately cannot give any picture examples as I am at work right now, but you said you have the game save the player's progress.. when are you doing this? I have a couple ideas for this.

    1. Save the game after each level. Then they would be taken to the "level" select screen for example.

    2. You can save the game at any time, but have a "on save loaded" event so that when a save is loaded after starting the game again, switch to your main menu layout immediately. This would require you to have some global variable for keeping track of unlocked levels (which I assume you do).

    3. Though I have never experimented with it, I'm sure you could store data about level progress by using "local storage" rather than a save-state, but these are my ideas. I wouldn't mind testing these when I get home if you would like me to.

    Hope this helps!

  • It works, thank you! And yes I have the global variables

    This is what I did:

    I had it save on every level once they reached the goal.

    Condition: [Ball on collision with goal] Action: [Save game]

    And I added something to the start button on the main menu of the game for when the player returned.

    Condition: [On start button tapped] Action: [Load game]

    Condition: [On loaded complete] [Go to Level Select]

    (So that it would start at the level select screen instead of the level)

  • I am glad you were able to find a solution! That seems like the best route to go. Stay motivated, friend.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)