What Is This

PurpleToken was designed to give the average game developer hobbyist a method for storing a hi-score table that was globally accessible. Developers no longer have to worry about managing a server and database to share the top scores amongst an app's users.

What Makes It Different

While there are alternatives already out there, PurpleToken relies on a REST API. With all the powerful languages out there today, there are many hobbyist languages being used for developing mobile and web apps and not all of them are capable of implementing a connection utilizing a proprietary protocol. If the language of your choice supports HTTP requests over SSL, then you can integrate PurpleToken's system.

How Does It Work

As you submit scores to your game, PurpleToken will automatically sort the scores and keep only the top 20 while dropping the rest. How many scores you display to your users is up to you. You may only want to show the top 10 or perhaps only the top 3 best of the best. See the FAQ for other question regarding scores.

If perhaps you need to delete a score, currently the only way to do so is by logging in to PurpleToken then managing your game information from the site. From there you can delete any score you want.

How To Get Started

First, you'll need to register your game here. Sign up and confirm your email address then you'll be able to add your game. Once your game has been created, you'll need to create at least one game key. A game key is a unique identifier for your game. Because some folks like to keep the scores separate for different devices (apple, android, pc, etc.) you may have up to 4 game keys per game. Think of this as a private key, so don't give it out. This key is what indentifies and authorizes you to update the scores for your game.

You have the option to make your game public or not. If public, it will be shown in the game list here on PurpleToken where other registered users can leave reviews and rate it.

From inside your app, you'll need a secure SSL connection to purpletoken.com/update. Next, you simply assign values to the variables you're sending using POST. To retrieve scores, all you need is your gamekey assigned to gamekey. It will retrieve a list of player names and their scores in order. To submit a score from your app, you need to send 3 values; gamekey, player, score. Player can be either a name or a number, however you represent that particular user in your app. The score is an integer value and will be store in 4-bytes. Thus your maximum score limit can't exceed 2,147,483,647.