Simple online high score

Hi there! I’m teaching myself Unity, and just figured out how to get a high score saved under Player Preferences. However, I notice that when being played in a webplayer, the high score stays local to each machine-- therefore I can’t challenge people to beat my high score.

Here’s the current state of the game.

Is there a simple way to ‘host’ a high score online? (right now the files are hosted through my personal website). I’ve seen people talk about doing stuff with SQL databases, but that seems needlessly complicated. Or maybe it isn’t? Thanks in advance!

The easiest way to do it:

Create a simple MySQL database that contains fields for:

  • The User
  • Their score
  • The time the score was logged

Then create a simple PHP file that retrieves input from a GET parameter, use those parameters to check the database for the user (or create him/her) then update the score and the time.

Done! :smiley:

But keep in mind this is very simple method of doing so, and it would be best to add some sort of authentication method to tighten security and keep people from cheating.

EDIT:

There are other ways to go about it (ex. flat files, access database, etc etc) but this is probably the easiest method as you could simple make a call to the webpage (using WWW) like http://localhost/updatescores.php?user=SomeRan0mGuY&score=9999&time=031020141419

Look at this tutorial. Its free and simple