Happy that it helped!! ;)
You need to learn a bit of SQL code... Google for it and then you will save/update the score only when its better than the old score
Thanks for your comment! Hope it helped ;)
Hey! You have 2 options, I think C3 has an option to create local files... dont know if that works. The second option is via PHP write a script to save a .txt file, it is very easy. Google how to open a file and write/read a text file from PHP
Hey! Thanks for writing and I am happy that you enjoyed the tutorial and it was helpful!! Go and make some super awesome games and share them here later! ;)
First, your scores table must have a new column. So you have: name, score AND level/difficulty.
Then, when submitting score to savescores.php, you already sent name & score. Now you must also add the new variable: level/difficulty.
Last, when getting scores with getscores.php, let's say you will read only scores for level 2 or difficulty easy.
You can send a variable level/difficulty from the game to getscores.php. Edit the getscores.php PHP file to read from the Database only the scores with the requested level/difficulty.
I don't know why this sometimes happens. Sometimes it works, sometimes it doesn't. Trying to find out. Thanks for your comment!
Hey, I'm happy it helped! Contact me: duquekarl#gmail,com
Thanks for your comment. Glad it helped! ;)
If you liked the tutorial, don't forget to rate/thumbs up!
You can have different tables on the same database. With free MySQL you are probably restricted to only 1 or 2 databases.
For instance:
Table "scores"
PlayerID Score
007 150
003 487
002 293
Table "Players"
PlayerID Name Email Etc...
002 John johndsg@mail.com
003 Mike mikedsg@mail.com
007 Brad braddsg@mail.com
Anytime! Glad it worked!! :)
In Construct2, find the Array object. Then make it have SCORES*2 elements. I mean, if you want 10 scores, you need an array with Size 20 (10 names + 10 scores), etc. Try this and let us know!
Hey! Glad you liked it!
1. Some things to consider.
- Are there more than 5 scores in the Database?
- Maybe Construct2 is not deecting the Text boxes? Delete all the Text boxes and add them again.
2. In the PHP file getrank.php it adds +1. Find this line:
// Print the rank (the number of people who have better score than you + 1)
echo ($i + 1);
Then delete the +1 part.
Hope it helps fix the issues! :)
Thank you!! :)
Good to know! Thanks for the update
Member since 10 Mar, 2015