is there anyone can help me out or explain to me how to calculate scores?
example you have 5 stages or levels and every levels you will get scores or points. and when u reach the last levels you will get the total score and that's will be the high score. thannk you
Develop games in your browser. Powerful, performant & highly capable.
Just make a global variable called highscore or something and then add the score from every level to the highscore when the level ends. Then you will have your total highscore when all levels are over.
Thank you for your reply, i already tested like u just said and it works thank you, but this is just continuing the score from level 1 - level 2 like lets say level1 got 20 for the score and when i started level 2 the score start from 20 already what i want is back to 0 so every levels have different score and at the end on level 5 we can see the total score from level1 - level 5 like
Level 1 : 20
Level 2 ; 30
Level 3 : 40
Level 4 : 60
Level 5 : 100
total : 250 ( Highscore result )
sorry for my bad english.
If you want to make 5 levels, use 5 global variables and a 6th one for the total.
If you want to make 100 levels, I think you would need to learn "arrays "
Yes, arrays are awesome, check 'em out.