World and Level Scores Calculated Seperately

0 favourites
  • 9 posts
From the Asset Store
Easily generate many levels from a set of pre-built scenes (Construct 3 template)
  • I am looking for recommendations on how others would recommend doing this.

    I have a game that is basically Worlds with Levels and Questions within the Level. You get scores within the Levels by answering Questions and the World score is a sum of the Levels within the given World.

    I tried using WebStorage, via example download, but it doesnt seem to doing what I want.

    Here is how I am trying to get the scoring to work:

      Player is in World1, Level1, Question1 and gets a 10 points Apply 10 to CurrentWorld, CurrentLevel, CurrentQuestion (result World1, Level1, Question1 = 10) Apply +10 to CurrentWorld, CurrentLevel (result World1, Level1 = 10) Apply +10 to CurrentWorld (result World1 = 10) Player is in Question2, same World/Level, and gets a 10 points Apply 10 to CurrentWorld, CurrentLevel, CurrentQuestion (result World1, Level1, Question2 = 10) Apply +10 to CurrentWorld, CurrentLevel (result World1, Level1 = 20) Apply +10 to CurrentWorld (result World1 = 20) Player skips to Question5, same World/Level, and gets a 15 points Apply 15 to CurrentWorld, CurrentLevel, CurrentQuestion (result World1, Level1, Question5 = 15) Apply +15 to CurrentWorld, CurrentLevel (result World1, Level1 = 35) Apply +15 to CurrentWorld (result World1 = 35) Player goes to Level2, Question1 and gets a 20 points Apply 20 to CurrentWorld, CurrentLevel, CurrentQuestion (result World1, Level2, Question1 = 20) Apply +20 to CurrentWorld, CurrentLevel (result World1, Level2 = 20) Apply +20 to CurrentWorld (result World1 = 55)

    End result

    World1 = 55 (sum of all levels within world)

    Level1 = 35 (sum of all questions within level)

    • Level1 - Question1 = 10
    • Level1 - Question2 = 10
    • Level1 - Question5 = 15

    Level2 = 20 (sum of all questions within level)

    • Level2 - Question1 = 20

    And so on...

    I then want to report on the scores for each section individually.

    What is the best way to do this?

  • I am guessing LocalStorage but would I use three or is it possible to use one?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It is too bad there isnt a way to just sum the scores using an array or something.

    Here is basically what I was thinking the table would look like if I could store everything based on question score:

    Then if it were possible to use SQL type queries do a SUM([Question Score]) AS score WHERE World = '1' and similarly for Level.

    But I think it will look more like this in reality:

    I would really appreciate some input on how others would recommend doing this.

  • I guess maybe this is either a super simple problem and I am just overlooking the solution, it is a problem no one else has, or it is really difficult... Hopefully its not the first.

    Is an Array, or multiple, the solution?

  • echo... echo... ko... ko.. o.. ..

  • Thats not real a problem.

    I think you only need to think beyond the toturials.

    And maybe browse the custom plugins.

  • I believe it can be done but "How do I" or is an approach someone would recommend?

  • I think I am part way there now but not sure what I am doing wrong.

    The score doesnt seem to want to save in relation to the World.Level.Question.

    I purchased the example from AndreasR but in going through the code I think it is overkill for what I am trying to do.

    I am willing to pay someone to work this out with me.

    Here is my capx: http://gruvisoft.com/games/C2-HelpMe/World.Level.Question.Test.01.capx

  • What I ended up doing was creating an array for each level and then doing simple addition for each row in the level to calculate the score for the world.

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