News for hackers. Stuff that matters.
Re:Learn to Code Ethereum DApps by Building Your Own Game by DennisP on Wednesday January 10, 2018 @08:50AM (#16114862)
It'll make more sense once sharding is in production.

What makes more sense right now, for many games, is to put most of the state changes off-chain. If players are taking turns, they can sign the state changes as they go, and submit the final couple moves to the blockchain. Add in another trick and you can even make fair random numbers: http://www.blunderingcode.com/gamble-channels-fast-verifiabl...

This is how FunFair works; there's an on-chain transaction to deposit, another to close out and withdraw, and in between you can gamble all day without waiting for blocks or issuing transactions to the blockchain.

Re:Learn to Code Ethereum DApps by Building Your Own Game by runeks on Wednesday January 10, 2018 @11:08AM (#16115979)
As far as I can see, putting most of the state changes off-chain, without compromising security, is literally solving the blockchain scaling problem. If it can be applied to a game, it can be applied to e.g. Bitcoin (and used for payments).

I’m not saying it’s impossible, of course, just that a lot of really smart people have been working on this problem for almost a decade, without having a production-ready solution yet.

Re:Learn to Code Ethereum DApps by Building Your Own Game by DennisP on Wednesday January 10, 2018 @11:47AM (#16116474)
You're certainly right that it's a challenge and nobody is production-ready yet, but here's Ethereum's stage 1 sharding spec: https://github.com/ethereum/sharding/blob/develop/docs/doc.m...

A good discussion of the challenges is at their sharding FAQ: https://github.com/ethereum/wiki/wiki/Sharding-FAQ

Re:Learn to Code Ethereum DApps by Building Your Own Game by ncallaway on Wednesday January 10, 2018 @12:54PM (#16117151)
> putting most of the state changes off-chain, without compromising security, is literally solving the blockchain scaling problem

Isn't that the approach taken by the Lightning Network for Bitcoin?

I think it's totally fair to say that Lightning technically isn't production ready, but it does seem to be in the late stages of testing / early release candidate stage of development.

Re:Learn to Code Ethereum DApps by Building Your Own Game by albertgoeswoof on Wednesday January 10, 2018 @09:52AM (#16115264)
> If players are taking turns, they can sign the state changes as they go, and submit the final couple moves to the blockchain.

This is the same way that the lightning / plasma network works, right?

Re:Learn to Code Ethereum DApps by Building Your Own Game by theptip on Wednesday January 10, 2018 @10:57AM (#16115855)
It's one half of it; Lightning also needs a "time lock" mechanism to somehow execute payment for the committed balance of the channel if one party unilaterally abandons it. This is quite complex involving both parties holding a delayed and revokable payment from the other party.

In the case of a game, this might be simpler since you can have each player sign their own moves and the other player's last move, so that you can always broadcast your opponent's last move if they quit.

Re:Learn to Code Ethereum DApps by Building Your Own Game by DennisP on Wednesday January 10, 2018 @11:41AM (#16116418)
It's not too complicated on Ethereum. Here's some sample code, which Raiden devs have told me works much like their system.

http://www.blunderingcode.com/a-lightning-network-in-two-pag...

Re:Learn to Code Ethereum DApps by Building Your Own Game by DennisP on Wednesday January 10, 2018 @10:53AM (#16115813)
Yes, Lightning is similar, the previous blog post covers that. Plasma is a bit different, I'm still wrapping my head around it.