I'm currently designing a game for which I need to put an online database with highscores. Thanks to ArcadEd 's excellent tutorial, everything went smoothly, but now I face another problem.
The game exports scores to the database at the end of every level. This means that if you scored 600 points in level 1 and 700 in level 2, your total score will be 1300. However, as the score is send at the end of every level, this single session will export scores of 600 and 1300 for this player. This is problematic because of course I want only one score to be send per game session, not one per level!
Is there a way to avoid this?
One way I thought about doing this is to create a random (long) string of characters and add this to the database under "sessionID" so that each session correspond to a single ID and the score is sent to the same place of the database, thus avoiding multiple scores to be send from the same game.
Is there a better way to do this that you can think of?
If not... well I have troubles creating this random string of characters (it should use most ascii characters). I should probably make a loop and append a random character at the end of a variable, but is there any way easier to select any random character than having a random number between 33 and 126 and extracting the character corresponding to this ascii code?
Not exactly sure how to translate this into Construct 2 either... Or maybe is there any string generator out there in the plug ins?
Thanks for any help!