This is a Demo for you to understand how to use SteemGG SDK.
- Get API Key when create a new game.
- Embed API Key in game, sample code is as below:
steemGG.setKey("2iv6amrpqrm4o398mcf52nxgi2aq1okz9h9r2k3kdq4s");
- Zip game and upload.
- Set Score, Get Score, Get User, Get Leaderboard, etc.
A typical game record to be stored looks like this:
{
"id": 3141, <---- current game id
"userId": "user1", <---- current user id
"customField": { <---- a custom field, which developer can store any custom fields they want
"score": 90, <---- Note: 'score' is a special field, the value stored in this field will be used to generate the leader board
"key1": "xxx",
"key2": "yyy",
...
}
}
SteemGG SDK Wiki:
https://github.com/steemgg/steemgg-website/wiki/SteemGG-SDK
Posted on SteemGG - STEEM Blockchain Based HTML5 Gaming Platform