Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: WordLines – A zero-knowledge proof-based blockchain puzzle game (github.com/nalinbhardwaj)
83 points by nibnalin on Jan 6, 2022 | hide | past | favorite | 23 comments



Hi folks, I recently made a small game using Zero-Knowledge proofs that awards players Ethereum NFTs for successfully solving a puzzle. Zero-Knowledge proofs are a pretty new crypto idea with lots of cool applications like this one.

I've also recently written up a long-form post on the theory behind ZK proofs that might be interesting to folks here: https://nibnalin.me/dust-nib/a-succinct-story-of-zero-knowle...


Congrats for the impressive technical feat!

One (maybe naive) question: at a certain point in the demo, Rainbow wallet forecasts a 400$ gas fee. Does this mean that in order to play this game, I need to spend hundreds of dollars for each round? I know that there are many other chains that are vastly more efficient, plus all the L2 optimizations and all. I was just wondering if this is actually the case in this particular instance or I'm missing something important.


I don’t really see the reason why one would want to do that on the ETH mainnet. If you just want to play the game it’s trivial to spin up a private network and play for free.


I never noticed this in the demo


It's about 24 seconds in. Look at the bottom left corner.


The demo is using the Ropsten test network. No idea if that's an accurate price quote against mainnet or not. Would need to know how much gas the transaction cost.


Congrats - that's really cool. It's a super interesting space for sure and I'm pretty convinced it's the future of blockchain games.

If anyone's interested, we built a 3D Dungeon crawler with ZKPs as part of a hackathon. There's a major mistake on the ZKP validation (left as an exercise for the reader to spot!) but works great as a POC and a nice couple of hackathon prizes too. Also has NFTs and randomness from an oracle for good measure.

Code: https://github.com/Derked/FantasyCampaign

Video run through: https://www.youtube.com/watch?v=zp5nEtPFvBo

Happy to answer any questions.


I actually quite like this. The technical writeup was easy to follow, and this is the first example I've seen of a genuinely original use for NFTs.


As a technical demonstration, this little project is really interesting. There's only one aspect I'd like to poke at a bit:

"Mobile gaming is more interesting than PC/web clients to me. If nothing it means developers can use push notifications and make games a much more mindless/regular part of players' day vs. depending on users to actively seek out their game on their computers."

This is one of the dark patterns that are actively eating away at our attention spans, and should be avoided. Develop ethically, please.


Mobile gaming has the lowest retention on the market - 90% of users leave on day 7.

Mobile gaming is catered towards more casual audience succeeds better with micro-transactions (i.e. $0.99 - $2 like in-app purchases)

Most of the notifications get turned off if spamming most of the time and do not really help that much if the gamer is not intrinsically into that game. So its like fake marketing when you push but loose out anyways.

The dark pattern is really gacha style and gambling related casino games where slots are not real but you need to pay to spin. Users who get hooked spend thousands of dollars on it.


I think we're really abusing the terms 'dark pattern' and 'ethics' at the point where merely popping a notification about ingame events is covered.

When Tetris was first released back in 1986, its uniquely addictive nature led some to theorize that it was intrinsically harmful, or more conspiratorially, that it was a weapon made by Russians to harm US productivity. Had Tetris first been released in the modern era, I think both of these (patently insane) complaints would have been taken more seriously.


I see a fundamental problem in the following general attitude: "make games a much more mindless/regular part of players' day vs. depending on users to actively seek out their game". Why do this? Why not just put the game out there, and if it's any good, players will start raving about it. Sure, in this case it's pretty harmless. But when most executives and/or developers start thinking this way, it turns into a sort of arms race for users' attention. User attention is basically the new "market share" that they seek to maximize. I think that as long as this is the general view on things, the companies' incentives (or individual developers, to a somewhat lesser extent) is misaligned with the public good.

And specifically on notifications, we have evidence that they don't have a positive impact on our attention spans: https://dl.acm.org/doi/abs/10.1145/2858036.2858359 https://pubmed.ncbi.nlm.nih.gov/26121498/


There's also a difference between "merely popping a notification" and actively hoping to make your games a mindless part of players' days, as in your parent's quote.


"there are no clean non ZK mechanisms to prove your solution outside of sharing the solution itself"

This is not entirely true. Witness hiding proofs are not zero knowledge (no simulator) but also do not reveal the solution. It is a subtle but important difference that can matter in some situations -- for example, a witness hiding proof could potentially allow the verifier to prove a related statement (e.g. proving that the proof protocol was executed).


How much does is cost in gas to submit the answer?


Very cool, thanks for sharing.

What would be the eventual process to make something like this decentralized so as to ensure no single party controls the server that (if I understand correctly) would set the day’s puzzles and handle verification?


Wouldn't setting the puzzle for the day need to be somewhat centralized, because otherwise everyone, or a lot of people, would already know the solution/not get to enjoy the puzzle?


In PoW you don’t know the next block hash; I wonder if it’s possible for this ZK word puzzle system to be somewhat like that? I suppose it would have to unlock the next puzzle as soon as somebody submits a valid solution, so it wouldn’t be playable on a day to day basis.

Maybe a less on-chain but still relatively decentralized solution for long intervals between puzzles is a chainlink VRF oracle.


nice, I was just reading https://blog.zkga.me/announcing-darkforest where they use zkSNARKs for a fog of war game mechanics


Good luck getting this past play store review, I think the technical term is "in-app payments circumvention"


Any mobile or online game like this without all the blockchain stuff?


> WordLines is a ripoff of NYT's Letter Boxed game [0] on the Ethereum chain.

[0] https://www.nytimes.com/puzzles/letter-boxed


Only 1 game per day...

Any other link?




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: