Zteem.io read/write to the blockchainsteemCreated with Sketch.

in gamedev •  7 years ago 

This is a project of making a simple browser game that uses the Steem blockchain to save/load some data. Current test version can be found at https://spelmakare.se/steem/zteemio

The goal of the week was to have the high score list finished. Unfortunately one of the planned days for working on this did not happen. I did get to finish the test posting of a high score and test reading to find the latest high score on the blockchain.

Here is a shot of the test when reading the high score in game:
Screenshot_20180504_160705.png

and here is the corresponding test post https://busy.org/@smjn/zteemio-high-score-test-4

What happens is that the game saves JSON data in the custom_json for a blog post, this data can then be used to create a high score list and to check if the current user score is good enough to get on the list. If so a new post can be made with the updated high score list included.

This is all done client side and is sort of the point, to be able to have a game with cloud/community features without having to operate any sort of server. The downside at the moment, and not something I worry about for this project, is that users can cheat and the high score list can be reset if no one plays the game for a week and the last posted high score did not get any upvotes/comments or enough weight to keep it listed in the created/new posts list for a tag. This can be solved by adding a tiny bit of server usage. For example, if using Amazon AWS and a minimal use of some services, the server part can be made for free or pretty much close to free.

Hopefully next week a test version will be available where you can play and post your high scores.

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Interesting idea, I would like to see more.

But let's talk about scaling, what will happens if you'll have new players every minute, and highscores will be changing all the time? Wouldn't it break then?

I don't think it will be a problem. Have to make it popular and find out :)

Not everyone goes on the high score list and when you do it fetches, updates and post the new list in one go. At worse adding a minimal server bit to keep the hot high score list and use it for all posts. Should the server go down/close you have the list on the chain.