News for hackers. Stuff that matters.
Re:Learn to Code Ethereum DApps by Building Your Own Game by runeks on Wednesday January 10, 2018 @07:40AM (#16114495)
In all seriousness, who would want to build a game on top of a platform that’s currently limited to ~15 state changes per second? And where each of these state changes cost money?

I get the interesting aspect of creating a game with a limited supply of some virtual good, but how much energy does it make sense to put into a game of this nature when the underlying platform prevents your game from becoming successful (because it can’t handle that kind of load)?

I suspect there’s a genuine use case for limiting the supply of virtual goods in games, but I doubt the solution involves all games performing state updates using on-chain transactions in a single, shared blockchain.

Re:Learn to Code Ethereum DApps by Building Your Own Game by will_brown on Wednesday January 10, 2018 @08:04AM (#16114613)
>who would want to build a game on top of a platform that’s currently limited to ~15 state changes per second? And where each of these state changes cost money?

Every developer interested in making (a lot) of Easy money by riding the crypto bubble. Maybe the question should be what gamer would be interested in paying for such a game (i.e. paying significant sums for pictures of cats and paying more at every turn...you can’t even give a picture of a cat away free without paying gas), but the answer is the same...any gamer wanting to make money off the cryptobubble.

Blockchain can be marketed with terms like immutable, decentralized, and smart contract all anyone wants. However the reality is it’s all a race to the bottom based on greed and speculation.

Re:Learn to Code Ethereum DApps by Building Your Own Game by AnIdiotOnTheNet on Wednesday January 10, 2018 @09:20AM (#16115035)
When you say it like that, speculating that people will continue to be greedy seems like a smart bet.
Re:Learn to Code Ethereum DApps by Building Your Own Game by alextheparrot on Wednesday January 10, 2018 @09:53AM (#16115267)
You’ll want to look into counterparty risk before placing such a bet, in which case you’ll likely find the house tends to win.
Re:Learn to Code Ethereum DApps by Building Your Own Game by z28w on Thursday January 11, 2018 @02:37AM (#16122090)
As far as I know pictures of cats are hosted in some centralized server. https://medium.com/loom-network/your-crypto-kitty-isnt-forev... Anyhow I agree with your point
Re:Learn to Code Ethereum DApps by Building Your Own Game by soup10 on Wednesday January 10, 2018 @08:57AM (#16114905)
Greed and speculation today becomes genuine mass distrust and dislike of fiat tomorrow, don't underestimate cognitive dissonance.
Re:Learn to Code Ethereum DApps by Building Your Own Game by fny on Wednesday January 10, 2018 @09:38AM (#16115154)
Or potentially genuine mass distrust and dislike of cryptocurrency tomorrow, don't underestimate the cognitive dissonance of a bubble pop?

In my eyes, it's dangerous to crypto that advocates spout absolutisisms about crypto. With a fledgling technology and market, anything is possible, and we should be honest about the fact. Otherwise, you risk blowing up expectations to where a potential crash back to reality gives everyone an irreparable distrust and dislike of crypto anarchists akin to that of Wall Street bankers.

And then the powers that be will mock anarchism for it's corruption and greed, paint the technologist as a devil, and write history books warning of the folly of decentralization. Anarchy is dead, long live anarchy!

So maybe the last part was overblown, but in seriousness, when people lose a lot of money, they get very angry. I'd hate to be the ideology at the receiving end of that anger.

Re:Learn to Code Ethereum DApps by Building Your Own Game by will_brown on Wednesday January 10, 2018 @09:46AM (#16115220)
We wrote the same sentence, but I am posting it anyway...”greed and speculation today becomes genuine mass distrust and dislike of all things cryptocoin/token tomorrow.”

It’s all fun and games until the IRS comes knocking at your door for failing to pay taxes on each and every cryptokitty transaction.

People thought blockchain and Bitcoin was a way to escape fiat...turns out mining is taxed as ordinary income, investing transactions as capital gains, and the IRS only accepts fiat.

People thought Ethereum smart contracts were a way to escape the legal system (the code being Law and all)...turns out people could’nt trust these smart contracts to do what they thought and were marketed to do (DAO); turns out the code isn’t the Law because the parties to the smart contracts could just fork and break the contract; and it turns out the SEC can actually regulate and prosecute ICOs that violate securities laws.

Who wants to file a tax return and pay ordinary income on every cryptokitty they birth or capital gains on every cryptokitty they sell?

Maybe I can get ahead of the ball and start offering “stripe atlas for self directed IRA LLCs for tax free cryptocoin/kitty trading”.

Re:Learn to Code Ethereum DApps by Building Your Own Game by mbaha on Wednesday January 10, 2018 @10:00AM (#16115331)
Am suddenly interested in building a product that handles your taxes when you give it read access to your Coinbase account.
Re:Learn to Code Ethereum DApps by Building Your Own Game by brathouz on Wednesday January 10, 2018 @11:02AM (#16115901)
You'll need to support a lot more than just importing Coinbase transactions. The site bitcoin.tax lets you import from 17 different sources and, despite its name, handles nearly all digital currencies, not just bitcoin.

However, nothing currently exists that seamlessly handles scenarios like cryptokitties, or when tokens are automatically bought/sold behind-the-scenes of a dapp via 0x, etc.

Re:Learn to Code Ethereum DApps by Building Your Own Game by drngdds on Wednesday January 10, 2018 @09:29AM (#16115108)
No, not necessarily. It probably won't. Crypto in general continues to be pretty bad as currency, particularly because of security issues (your 'best' options for storage are a physical wallet or a sketchy and/or uninsured exchange) and volatility (who wants money that could become 25% less useful tomorrow?).
Re:Learn to Code Ethereum DApps by Building Your Own Game by olouv on Wednesday January 10, 2018 @10:41AM (#16115711)
To me it's like the limitations of first game consoles (1kB usable RAM for the NES). Having great games work on it needed quite crazy coding skills and several hacks to use less space.

Ethereum is still in it's infancy today and it does indeed have a very slow processing power and speed. But you can bet on the fact that it will improve exponentially.

Do you remember the first hard drives? 56K Internet speeds? IE6 browser? So many challenges have been overcome during the last decades in tech, why would it stop here?

There is a lot of brillant and very-well funded people working on the subject and they will find solutions to improve the platform. No doubt about it.

I always find it odd that such a tech-craving population as HN readers always seem to miss the bigger picture.

Re:Learn to Code Ethereum DApps by Building Your Own Game by runeks on Wednesday January 10, 2018 @10:57AM (#16115858)
> To me it's like the limitations of first game consoles (1kB usable RAM for the NES). Having great games work on it needed quite crazy coding skills and several hacks to use less space.

That’s not a fair comparison, in my opinion. A billion NES consoles can operate in parallel, without affecting the performance of other consoles. It scales perfectly. For a shared blockchain, however, performance deteriorates for you when someone else plays. And it doesn’t even have to be the same game. I mean, if a single game like CryptoKitties can reduce performance and increase fees, how will it look when there’s 10 games out there, or 100?

> I always find it odd that such a tech-craving population as HN readers always seem to miss the bigger picture.

I’m not saying this can’t be solved in the future. I’m talking about the present motivation for building blockchain-based games. Why can’t we critique technology just because it has the potential to improve in the future?

Re:Learn to Code Ethereum DApps by Building Your Own Game by jmduffy on Wednesday January 10, 2018 @12:46PM (#16117085)
You're totally right — it doesn't make sense for every DApp to run on the mainchain.

There's an inherent tradeoff between performance and decentralization. The major blockchains like Ethereum focus on decentralization above all else, because it's extremely important for a cryptocurrency where there's a real financial incentive for someone to attack the network. Performance is important, but shouldn't come at the cost of decentralization. There's a ton of smart people working on scaling Ethereum, and they will scale, but not to the level required to run WoW and Twitter simultaneously on the mainnet.

Which is why we think scalability will be achieved through sidechains. A sidechain can play by its own set of rules. Something like an online game or community on the scale of Hacker News needs to optimize for realtime performance, but can make reasonable tradeoffs for security — on a blockchain data integrity is already ensured by cryptographic signing, and you can't "double-spend" a comment or post, so there's little financial incentive to attack the sidechain to delete a historic comment.

I'd say the motivation for learning to build blockchain-based games now is because the infrastructure for this tech is coming very soon. We're in the process of building out one game as a demo to showcase Loom Network, and are talking to a couple other game studios who want to build games on our platform.

Things like CryptoKitties may just be a novelty right now, but they're paving the way for new types of game economies that that we've never seen before.

Re:Learn to Code Ethereum DApps by Building Your Own Game by ertand on Wednesday January 10, 2018 @11:21AM (#16116156)
I think the main motivation for a developer who believes that ETH will solve the scalability challenges at some point is to master these technologies early on. I have lots of doubts about DApps but I can see why it's good to learn them now.
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.
Re:Learn to Code Ethereum DApps by Building Your Own Game by Tepix on Wednesday January 10, 2018 @08:29AM (#16114740)
Sure, it's a limitation. But working around limitations or using them as a core element is a standard thing during game design.

So perhaps you have a game where you play for several hours or even days and only then eventually you want to save your progress on the blockchain for the world to see. Just an example.

As seen with CryptoKitties the high transaction cost is a crippling factor right now, on the other hand the game wouldn't even be possible in its current trustless design without the blockchain.

Re:Learn to Code Ethereum DApps by Building Your Own Game by will_brown on Wednesday January 10, 2018 @08:41AM (#16114811)
>on the other hand the game wouldn't even be possible in its current trustless design without the blockchain.

Is it really a “trustless” game? If the company folds and the website with it, sure you still have your “CK Tokens” in your wallet, but without the centralized platform you can’t exactly access the picture of your kitty, you can’t breed, you can’t sire, you can’t gift...in other words you can’t even transfer the “CK token(s)” from one wallet to another without the platform. Therefore it seems there is a whole lot of trust the platform will continue to exist, not to mention the value of the kitties is constantly subject to change, not just on a free market basis, but based on the rules and prices which are unilaterally set by the centralized company.

Re:Learn to Code Ethereum DApps by Building Your Own Game by DennisP on Wednesday January 10, 2018 @08:53AM (#16114878)
If you want to, you could put the UI on a p2p filesharing network. That's the ultimate goal of Ethereum's "web3" plan with Swarm, and probably could be done now with IPFS.
Re:Learn to Code Ethereum DApps by Building Your Own Game by Blindedwino on Thursday January 11, 2018 @06:35AM (#16122997)
If you want to, but the company behind CryptoKitties doesn't want to.
Re:Learn to Code Ethereum DApps by Building Your Own Game by alanfalcon on Wednesday January 10, 2018 @01:09PM (#16117296)
The smart contract that performs these actions still exists and anyone can (and some people like me do) interact with it without touching the website UI / front end. The pictures of kitties are easily recreated once you have all the secrets of the genome, which we do (well, there could be more secrets but we could recreate the ones we know about which is all we can/could care about). The legal aspect of that latter part is murky but the CK devs promise they are working to clarify despite the complexity of this new space.

Yeah the game would lose 99.9% of its potential userbase without the front end, but if the remaining 0.1% wanted to build a new web interface we could and the game could go on. This may seem similar to spinning up a legacy WoW server, but the difference here is that we’d still have our own actual kitties and no be able to cheat the system so the game integrity remains in the blockchain version.

Re:Learn to Code Ethereum DApps by Building Your Own Game by annabellish on Wednesday January 10, 2018 @07:57AM (#16114576)
>I suspect there’s a genuine use case for limiting the supply of virtual goods in games

There's many, but none of them include blockchains. Being "distributed" isn't a valuable enough attribute for games to make it worthwhile. What you get is stuff like CryptoKitties, which isn't a game but is just trying to be more speculation.

Re:Learn to Code Ethereum DApps by Building Your Own Game by 0xdada on Wednesday January 10, 2018 @09:13AM (#16114992)
Imagine a TCG where you can sell your collection when you want to quit the game. You could buy packs via smart contracts with full transparency wrt. card rarity. The game could add a small fee to pack prices to cover upkeep and creative costs. Some of these fees could be redistributed to players via card/pack rewards. The only requirement (and a strong one) is that the game is actually fun to play, so most of the player base isn't speculating on price.

I think this could give Hearthstone et al. a run for their money.

Re:Learn to Code Ethereum DApps by Building Your Own Game by jraedisch on Wednesday January 10, 2018 @02:58PM (#16118423)
The problems are real. I wrote a simple contract that validates a solved sudoku and rewards `sudokoin` for it. But even at the time of deployment, running it cost about 1$. Now it is probably closer to 10$.

On the other hand, once the contract is deployed and the code open sourced, you can pretty much prove that you cannot manipulate your own creation anymore. It will probably be even better once there are other languages than Solidity to develop for the EVM.

I wrote a blog entry about my experiences and the second iteration on another platform at medium: https://medium.com/@jraedisch/the-path-to-sudokoin-6aee92cfa...

Re:Learn to Code Ethereum DApps by Building Your Own Game by ThomPete on Wednesday January 10, 2018 @07:48AM (#16114531)
Any turnbased game?
Re:Learn to Code Ethereum DApps by Building Your Own Game by neuralzen on Wednesday January 10, 2018 @10:00AM (#16115327)
One of the reasons why I suspect NEO may be more suited for such things. State changes will likely still be a factor, but once the smart contract is deployed, it's free to execute.
Re:Learn to Code Ethereum DApps by Building Your Own Game by ringaroundthetx on Wednesday January 10, 2018 @01:41PM (#16117616)
> but I doubt the solution involves all games performing state updates using on-chain transactions in a single, shared blockchain.

Right, and there are people working on the blockchain level with very compelling bandwidth improvement solutions.

You might find one interesting, take a look.

There are people making silly games right now on the understanding that the infrastructure they are building on will improve. These people are doing this because it helps them understand the toolkits, language and infrastrcture, which has a massive upside in their opportunities by merely exposing themselves to it now. When the infrastructure is already there, and the books exist, and the college kids are learning it at state schools, the opportunities won't be nearly as great for them. And yes, they can be wrong!

But it isn't as simple as you (and everyone other competent full stack engineer) questioning their life choices and being the only people to notice that the underlying platform has an uncompetitive limitation right now.

Re:Learn to Code Ethereum DApps by Building Your Own Game by disko on Wednesday January 10, 2018 @07:54AM (#16114566)
Better to do this on NEO instead. Their tech is better than ETH in every way; it can handle up to 10.000 transactions per second (whereas ETH can handle ~15) and it supports almost all mainstream coding languages. What's more, transactions are free.
Re:Learn to Code Ethereum DApps by Building Your Own Game by mbrock on Wednesday January 10, 2018 @09:35AM (#16115133)
I'm thinking it might be time for Hacker News to start enforcing a rule against nonsubstantive promotions of various three-letter technologies.
Re:Learn to Code Ethereum DApps by Building Your Own Game by jorge-d on Wednesday January 10, 2018 @09:20AM (#16115030)
Deploying a Smart Contract on NEO costs 500 gas, which is approx. 28k$ as of today.
Re:Learn to Code Ethereum DApps by Building Your Own Game by neuralzen on Thursday January 11, 2018 @12:30AM (#16121607)
True, but once deployed it's free to execute. The intent is to weed out junk contracts, among other reasons. There has also been discussion of reducing this cost, as the value of GAS rises.
Re:Learn to Code Ethereum DApps by Building Your Own Game by tstyle on Wednesday January 10, 2018 @07:57AM (#16114573)
Is there a downside or trade off? I’m a little skeptical that NEO is strictly better in all aspects.
Re:Learn to Code Ethereum DApps by Building Your Own Game by pietjepuk88 on Wednesday January 10, 2018 @09:57AM (#16115304)
NEO is currently quite centralized†, which is an easy trade-off to make for higher throughput (see the traditional infrastructure of the web). It may not become more decentralized in the future, but its consensus mechanism (dBFT) is not really proven yet, which is why they are playing it safe. They will continue developing it of course, as will Ethereum with its proposed and not-yet-rolled-out PoS.

Time will tell which one is safe. If the rewards are high enough, someone powerful/knowledgeable will inevitably try and break or cheat the system.

† Some people like to make a distinction between "distributed" and "decentralized". For me the former is part of the latter.

Re:Learn to Code Ethereum DApps by Building Your Own Game by Cybourgeoisie on Wednesday January 10, 2018 @08:53AM (#16114883)
Cryptokitties is possible because of ERC 721, which allows for unique tokens to represent individual assets (having an indivisible kitty with its own dna). As far as I'm aware, NEO doesn't yet provide the ability to create individualized tokens that can be stored on the blockchain in a similar way.
Re:Learn to Code Ethereum DApps by Building Your Own Game by zeroxfe on Wednesday January 10, 2018 @09:38AM (#16115153)
ERC 721 just an API standard for non-fungible assets. There's nothing special on inherent to Ethereum that makes Cryptokitties possible.

You can totally build something Cryptokitties with NEO -- the only difference is that because there isn't a standard, there isn't a third-party marketplace for these assets. (i.e., there's nothing inherent about NEO that prevents something like Cryptokitties from being built.)

Re:Learn to Code Ethereum DApps by Building Your Own Game by stuxnet79 on Wednesday January 10, 2018 @08:48AM (#16114853)
Can you elaborate on this? I've been curious about other dApp platforms similar to Ethereum as I can't help but feel underwhelmed by Ethereum's capabilities currently.