Client-side game scoring with blockchains

If you’re reading this, there’s a good chance you (at least occasionally) play games online in your browser. You’ve probably noticed that client-side games, and particularly multi-user ones, don’t have the same performance as software that you install on your computer (or use on a dedicated gaming platform). This is at least partially because the scoring model for such games is typically hosted on the server, since javascript is too easy for users to access and modify themselves. The typical design for javascript (and also older Flash) games is to have them constantly communicate the player’s moves back to the server; the server determines scoring and other updates, and returns that back to the user. This introduces lots of opportunities for lag.

I haven’t had a chance to really think this out in detail, but what if a javascript-based game used a blockchain system instead?

Here’s what I’m thinking:

  • The server keeps track of (and likely caches, in order to reduce the size of transactions) a blockchain
  • When the user loads the game, they receive a portion of the chain, along with the entire scoring model in javascript
  • As the user interacts with the game, additional entries are made in the blockchain to record them
  • The user’s chain is periodically sent back to the server to check for cheating, and to keep all of the users in synch
  • There would need to be some sort of mechanism for interchange of blockchain transactions between users, to keep the system honest

As I previously mentioned, I haven’t thought this out in a great amount of detail. Assuming this approach works, it could move a lot more of the code into the client, and reduce client-server communication. That should speed things up significantly.