Maintain Level Progress

0 favourites
  • 13 posts
From the Asset Store
Progress\Loading Bar. Now Load you game like a Professional.
  • What is the basic concept for maintaining progress on levels in a game so that when returning to the game you can continue from where you left off?

    Do global variables and web storage provide the answer to this when running the game on Android?

    Hoping someone can point me in the right direction for a good read.

  • yes webstorage, but now there's a new LocalStorage that is replacing it.

    it's pretty straight forward and not too hard to implement..

  • You could use System -> load / save game.

    So, let's say at the beginning of each level (or even a checkpoint), you do.. System -> Save("auto")

    Then player quits and comes back later.. main menu has a button "CONTINUE". On clicked, System -> Load("auto"). This will start the player exactly where they left off.

    This is by far the easiest method but depends on your game. Using this method, you'll have to use the "no save" behaviour for objects that don't need to be saved, like scenery etc.

  • Decided to go with a 2 dimensional array.

    Just not sure how to save this using WebStorage

    Something like:

    WebStorage.localValue(THISLEVEL,0) to 1

    WebStorage.localValue(THISLEVEL,1) to 1

    WebStorage.localValue(THISLEVEL,2) to 1

    Hope someone can help.

    Thanks everyone.

    P.S. I'm loving this program

  • Got it I think

    Answer should be:

    1. Load in the 2 dimensional array at the beginning using JSON

    2. Set the local key to the JSON

    3. Access array through LEVELSARRAY.At

  • Were you succeed?

  • Hi, i´ḿ from Cordoba(Spain). also I have the same doubt........I use google translator , and it costs me a lot work to solve some doubts.

    My game is also based on levels. And I want to know how to save progress .....both runlevels as using save points.....

    i have r200 c2.........(local storage works??)

    Sorry to be so clumsy, but the language cost me a lot of work

    appreciate if someone spoke Spanish to explain this.

    (Si alguien habla en español para explicarme por favor, lo agradeceria)

    thank you very much , sorry request .

  • It's a bit hard explaining the full process on the forum. What you need to do first is read the excellent tutorial here:

    https://www.scirra.com/tutorials/307/ar ... -beginners

    Then once you have dived in and given it a try, you will have many questions to ask.

    You then need to ask these specific questions on the forum in your own thread (probably the best way to get an answer)

    I've only had Construct 2 for about 2 weeks and I'm well into this excellent program.

    Most of the problems I've had, have been through rushing into things and not reading enough first.

    The people on the forum provide some great answers but they need specific questions.

    Some tips that I've learned regarding arrays and Construct 2 specific to my project:

    1. In order to use arrays you need to add the array object first

    2. Start off small and create a one dimensional array (properties window)

    3. The term "webstorage" works on browsers and also when you export it to android

    4. Use the debug window to check everything is working and to make sure values are being stored

    5. Load the scores at the beginning of the game process

    6. Store the scores as and when they happen (in case the app crashes/battery runs out etc)

    7. To store "Level Complete" add a 1 to the end of the array

    8. Take it in small steps, do one thing at a time and check the array in the debug window

    My array looked like this

    0 - 440 -1 = translates to 0 is the array key (starts at zero) - 440 (score for that level) - level zero complete (I named my first level zero 0)

    1 - 221 - 1 = see above

    2 - 532 - 1 = see above

    3 - 0 - 0 = Level 3 - Zero score - Level not complete

    I needed one array row for each level.

    You can add up all the scores to show their high score from the array

    You can flag up levels as competed by adding 1 to the last section

    As mentioned I've only had Construct 2 a number of weeks so some of this information may be incorrect then again it may help.

    Good luck

  • .....Thank you for the advice

    goodness... i have i lot of patient.

    So, thanks, i 'll read again .....

  • The use of webstorage is deprecated, so if you want to learn this stuff, better do it with the LocalStorage object from the get-go I'd suggest.

  • loliur

    Que quieres hacer exactamente?

    Quizás puedo explicar mejor.

  • Te envio un privado..........

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • loliur

    Que quieres hacer exactamente?

    Quizás puedo explicar mejor.

    No se si te ha llegado el privado......

    basicamente lo que quiero hacer, es usar el webstorage para que me guarde los avances de cada nivel.

    Y aparte también usar el webstorage para que me guarde los avances dentro de cada nivel. (checkpoint)

    Y leo muuuchos tutoriales pero no me entero.

    Gracias

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