So, I fixed some bugs mostly gui ones but I also added a page where you can see the top 20 highscores.
I was looking for a way to effeciently store the highscores of all players on a database and be able to show them ingame. I really didn’t want to create a server just for that purpose. Also, I didn’t want to make a direct connection to a database because it would be really easy for someone with a decompiler to grab the db info.
So, I came up with another way that is not that safe but at least the hacker is not able to completely manipulate the database. So the client, establishes a connection with a php page I coded and via the get function in php, the page saves the info in the database. Then, in the highscore page ingame, client grabs the top 20 scores that are echoed on the website using php and prints them.
In order to have your score saved you must have added a username before you start playing, in the main menu, which is saved in a tiny text file in the same directory, so it can remember you each time you decide to play.
Paul.