GameStick server improvements

I've been continuing work on the Playjam GameStick replacement server and managed to implement two features: Achievements and leaderboards.

Achievements

Achievements are things you reached in a game, e.g. jumping onto 3 enemies without touching the ground in Bloo Kid 1, a "Triple hit".

Whenever a player unlocks an achievement, the game sends that information to the server - a simple set-complete API call with the ID of the achievement and the session ID of the user. The server then has to store it in a database, and return it when requested.

Achievements can be requested in several locations:

GameStick UI: profile GameStick UI: Games with achievements GameStick UI: Game achievement details

Each of those locations had its own API call. Implementing the first and the last were easy, but the per-game achievement overview in the GameStick UI was pretty hard - the JSON structure was not parsed by the low-level GameStick database interface, but was handed off unparsed to the Marmalade-based UI, which parsed it and then crashed.

Guessing the property name for the achievement list yielded no results. Since the Marmalade SDk compiled code into C, it is pretty hard to decompile.

Fortunately, I found a Ghidra plugin for Marmalade, and after fixing a bug I could load the Console.s3e file into Ghidra. After some looking I found the property name for the achievement list: gameList.

Ghidra: Console.s3e analysis

All achievements were unfortunately registered at the server, and we have no backups of them. This means the games have to be decompiled and inspected to find out which achievements exists, what their title and description is. The achievements on the server also had images, which are lost forever.

Currently the game metadata repository has achievement information for Bloo Kid, Boulder Dash, Prince of Persia and ShaqDown.

Achievements in Bloo Kid Achievements in Prince of Persia

Leaderboards

Unlike the OUYA, the GameStick had native support for high score lists (but only one per game).

After implementing achievements, leaderboards were quickly done - the only API calls required for all games I know are saving the current score, and fetching the top 50 scores.

A couple of games provide high score lists: FallingBird, FourColorTaxi, GridLock, Magnetoid and Prince of Persia.

Stop the birds unfortunately fails to show the leaderboard for yet unknown reasons.

Leaderboard: 4 color taxi Leaderboard: Falling bird Leaderboard: Gridlock Leaderboard: Magnetoid Leaderboard: Prince of Persia

Also on: Mastodon, Twitter.

Written by Christian Weiske.

Comments? Please send an e-mail.