Verna's Forum Posts

  • How do you identify a player? Does he just pick his name from the list or does he have to enter it somewhere?And if other players want to play with the same name? That's cheating.

    It's very important to identify the player. For this you can use either google services or firebase or another method of identification.

    Once you have a unique identifier of your player you need to check the local storage, if there is such a key, then download.

    I first used a file to store the username, user ID, and user password, and called that file using AJAX, storing the information in an array. When the user enters their ID and password, if it exists in the array, they log in successfully; otherwise, the login fails!

    Currently, my method is to store multiple user attributes in JSON format in local storage, and I want to save the records when the user leaves or finishes the game. The next time they return to the game, the system can recognize the user and restore their multiple attributes.

    How do I read the data stored in JSON format in local storage? There are still some issues that I haven't been able to resolve! Or would you recommend another method for storing and reading the data? Thank you very much!

  • Hi.

    You can use different names when you save each user's data to local storage, then after selecting a name, load exactly that user's saves.

    But.

    I would do via array or dictionary, store all variables for each player there, then after selecting a name load the desired array string into global variables.

    HI~I'm using Dictionary to store data!

    And now I'm curious about how to load these data so that I can identify and recover each user's game progress. Could you give me some advices? Thanks a lot!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • "I am creating a game where certain values need to be stored individually for each user and restored to the previous game state when they return.

    For example:

    User A Mood: 50 Health: 35 Hunger: 65

    User B Mood: 30 Health: 45 Hunger: 25

    Could you please advise on how to achieve this? Thank you so much!

    some info:

  • I am creating a game where certain values need to be stored individually for each user and restored to the previous game state when they return.

    For example:

    User A Mood: 50 Health: 35 Hunger: 65

    User B Mood: 30 Health: 45 Hunger: 25

    Could you please advise on how to achieve this? Thank you so much!