Some time ago we started a web application on github named datastore-server which allows us to store data for our games in a remote server hosted on Google App Engine. Since the first data we needed to store was game scores, and we required more specific queries for them, datastore-server end up being a high scores server, at least for now.

We made an introduction of some of the requirements we wanted for the scores server in a previous post, we made some modifications to the basic concepts.


First of all, we added a new structure which identifies the player and has the following fields:

Profile {
    privateKey : String - a unique private key owned by the player on the client application, used to submit scores
    publicKey : String - a unique public key used to identify scores
    name : String - the player name
    guest : Boolean - if the profile is guest or not


Score structure has been modified to have a profile reference, and also some extra data required for scores filtering improvement (filter by date range):

Score {
    .... (previous data)
    profilePublicKey : String - a reference to the profile owner of the score 
    year : Integer - the year the score was submitted (calculated in the server)
    month : Integer - the month of the year the score was submitted (calculated in the server)
    week : Integer - the week of the year the score was submitted (calculated in the server)
    day : Integer - the day of the year the score was submitted (calculated in the server)

The server now provides the following features:

  • create guest and non-guest profiles for score submission
  • submit a score for a game given a profile
  • request scores given a criteria

Creating and updating profiles

To create profiles datastore-server provides a query named /newProfile with two parameters:

  • name : String - represents the name of the profile
  • guest : Boolean - if the profile is guest or not

The query returns the profile structure as JSON so that the client can save the private and public keys that are generated on the server.

We also provide a way to change a guest profile name and to make it be non-guest using the /updateProfile query:

  • privateKey : String - identifies the profile
  • name : String - the new name we want for the profile

Submitting a new score

To submit a new score we now need a guest or non-guest profile, it still uses the same query /submit with the same parameters plus the profile privateKey.

Requesting scores

To ask for the scores of a game we have the /scores query with the addition now of two new parameters:

  • distincts : Boolean - if scores should be filtered to return only one score per player (optional, true by default)
  • range : enum { day, week, month, all } - filter best scores by today, this week or this month respectively (optional, all by default)

So, for example, if you want the 50 best scores of the week for a game, you will query /scores?gameKey=something&limit=50&range=week.

Datastore Java client

Finally, to communicate in an easy way with datastore-server we created a Java library named datastore, also on github, which abstracts all communication stuff using apache http-client and also provide classes for score and profile concepts.

If you want to see high scores in action, you could play Face Hunt on PC here or on Android here, also you could take a look at the source code here.

Both projects datastore and datastore-server will probably change in order to incorporate other data storage beside scores.

Hope you like it.

Another Face Hunt update on Android Market, changes this time are:

  • Improved high scores.
  • Changed fonts for high scores and tutorial.
  • Changed background to look a bit nicer.
  • Added wake lock to avoid application to sleep when playing.
  • Modified default name for guest profiles to be guest-xxxxx instead undefinded-xxxxx.

We know it looks like a small change, but the release is related with some updates we made to our high scores system. We will talk about it in future post.

Hope you like it.

Some people told us that our games where hard to find on the blog so we are working on making finding them easier. In order to do that, we first created a new button Games to let you find our games easily. It should be on the right sidebar, do you like it?

Also, as we have a lot of games right now, updating the Games page manually is quite annoying. To improve that, we created a basic WordPress plug-in named wp-games-gallery which creates a simple gallery of games based on each game page meta data. So now, each time we create a new game page, the games list should be updated properly.

We have updated Face Hunt on Android Market again, adding the following changes:

  • Added remote highscores with a Highscores screen.
  • You can now specify your profile username on main menu screen.
  • Fixed some resolution bugs when showing Tutorial text on small and medium devices.
  • Red faces now do no damage when they are invulnerables but when vulnerables they do 2x previous damage.
  • Red faces status change times are random now.
  • Added new friendly white face which will recover your life for a while, but it will do a lot of damage if you kill it.

And here a list of probably next stuff to work on:

  • Local high scores to let you record your scores even if you are internet-less
  • Different high scores categories like daily/weekly/monthly/all like Jumping Slime does.
  • Power ups like explode all enemies or recover health, etc.
  • See how we can add some Ads to the game

Hope you like it.

We have updated Face Hunt on Android Market adding some new stuff to try to improve fun when playing it. The next video shows the changes:

Here is the change log:

  • Added new types of faces, a green one that moves random and a red one which becomes immortal for a while.
  • Added a Tutorial to teach you about each type of enemy
  • Now instead having two lives which you lose when a face disappears, you have a health bar which is reduced while faces are alive, so you have to kill them quick in order to survive longer.
  • Modified the game to use physics so the enemies now hit each other
  • Added particle effects when you hit an enemy
  • Added menu screen to choose between different game modes.

Hope you like it.