Android save score

  • Hi, I am really lost, the last thing I need for my game before I am done is how to save. I am making an android game that is like flappy bird. So can anyone please tell me how to save the highscore on the phone? I have many topics but I can't find anyone with step by step on how to do this. Please can anyone explain me the steps.

    Thanks

  • Read the manual ! <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

    https://www.scirra.com/manual/120/webstorage

    The steps :

    1) Save the data (Set local/session value

    Store a value (string or number) for a key in local or session storage. If the key does not exist it is created, otherwise its value is simply updated.)

    2) Read the data (LocalValue

    SessionValue

    Retrieve the value stored for a key in storage. If the key does not exist this returns 0.)

  • For an example of how I did mine (not sure its the best or most effecient, but it does work for me), I have the settings that are shown at this image

    My main issue going over it was getting it to display the highscore at the end, but was able to find the correct option after reading some of the posts on this forum.

    Hope the screens help

    http://game.reconone.info/files/config.png

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • For an example of how I did mine (not sure its the best or most effecient, but it does work for me), I have the settings that are shown at this image

    My main issue going over it was getting it to display the highscore at the end, but was able to find the correct option after reading some of the posts on this forum.

    Hope the screens help

    http://game.reconone.info/files/config.png

    Hi when I play the game in preview from construct 2 and make for example 1 point and close the preview and open it again it doesn't save, is it because it doesn't save in the preview mode? This is for android phone I want to make it and thanks for your responses!!!

  • > For an example of how I did mine (not sure its the best or most effecient, but it does work for me), I have the settings that are shown at this image

    > My main issue going over it was getting it to display the highscore at the end, but was able to find the correct option after reading some of the posts on this forum.

    >

    > Hope the screens help

    >

    > http://game.reconone.info/files/config.png

    >

    Hi when I play the game in preview from construct 2 and make for example 1 point and close the preview and open it again it doesn't save, is it because it doesn't save in the preview mode? This is for android phone I want to make it and thanks for your responses!!!

    The way i understand how it works (and thats going off about 2 weeks of using it) yes.

    I know my screenshot is kinda...crazy looking, i still need to get time to clean it up and maybe post a tutorial on what I did to make it work.

    If you can post a screenshot of your config, some of the smarter guys can take a closer look at it.

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