An architecture for decentralized games
At DevCon 2024’s New Games. New Worlds, we presented an architecture for decentralized games and encouraged onchain gaming companies to stop worrying and start proving (but not right now). You can watch the video or read the highlights below!
Today, we’re going to say something that you usually don’t hear at onchain games meetups: stop putting your game onchain.
You can get the benefits of blockchain composability and the financialization opportunities without all the hassle of actually running your game onchain.
Why do we build onchain?
Onchain games are usually built first because you want censorship resistance.
The second main benefit of onchain games is composability. In theory, we can compose the games, and my flame sword from World of Warcraft will be valuable in this other game.
Third and finally, you want distribution; that actually works quite well.
We've been building onchain games precisely because, as George Mallory said when a journalist asked him why he wanted to climb Mount Everest, « it's there. »
Right now, we’re doing all we do because it’s fun and new.
Being sufficiently onchain
Except none of the arguments listed above requires you to be onchain.
You can achieve all of these points by virtue of being onchain, but you don’t need to be onchain to achieve them. And there are better ways!
When Playmint introduced playerchains (off-chain graphs where players sign actions), this person did the usual onchain maximalist thing: « Oh, yeah, but actually, it’s great if everything is on the same chain ».
Sure.
But let’s replace blockchains with computers here for a second. It’s as if you were saying: « Oh, it would be so cool if every single application was running on a single computer. »
Is that wrong? Maybe not. But have you ever seen a computer powerful enough to do all this? No! That’s why we have APIs; that’s why we have servers!
I loved David’s answer to this:
I don’t think anyone has phrased it as well as David here.
In May 2022, two and a half years ago, I tweeted:
It’s really what motivated me to help build Dojo at the time! You can run your game onchain, but why would you go through all this hassle?
How Playmint does it
The two companies that are pioneering this are Playmint and Topology.
They tried everything. They tried Cairo, they tried going fully onchain, and they tried Redstone. All of this wasn’t good enough.
I love playerchains because they have all the good sides of P2P systems and are still amenable to connecting with blockchain with signatures.
And since it doesn’t require a wallet, you have a great distribution. People can log in and play. And it works! I played against the Playmint team (and won, by the way). There was no transaction time, no block time, no wallet, and no weird contraption to get me to sign into MetaMask. No « you need 500 bucks to start playing. »
I played, and it worked. It was fun! I beat them. I enjoyed myself. It was really cool!
They’re fast, and they’re cheap; onchain is an option, not the absolute threshold that must be met. It’s important that this option exists because we do care about onchain gaming, but the option is the keyword here. You don’t need to bow to the cookie-cutter framework of onchain games.
It’s okay not to be fully censorship-resistant all the time; we’re killing Orcs, not saving lives!
We are the new mobile gaming industry
As an industry, I feel like we’re like mobile gaming. When mobile gaming came around, all the serious gamers playing the hardest RTS games looked down on them, thinking, « Oh, no, this is not how you should play. This isn’t a real game. »
Today, 50% of gamers are mobile game players. My grandma plays on her phone, and so does my dad. This is how it should be. It’s a natural evolution.
And we’re here, yelling at new games, saying, « Oh, no, this is not how you should design games. This isn’t really onchain. »
We can keep wasting our time saying this, or we can actually onboard people and play.
Playmint combined fuzzy quantum sign P2P graphs with hard Newtonian blockchain hardness. They harnessed the best of both worlds: use the blockchain when it's useful and P2P solutions when they make more sense.
Playerchains are tiny rollups
Playerchains are basically tiny rollups. They have their little consensus, their little nodes, and guess what? The players are also incentivized to manage the nodes because it's their game, and that’s how they can play. So here: it's a rollup!
And what do rollups do? They create proofs of what they do and change the state digest onchain.
I’ve been nagging the Playmint team to start a space war: red vs. blue. You have a 3×3 grid where areas flip from blue to red. That’s onchain, and as a Blue player, you really want the Blue team to win. Everything else happens offchain, the whole actual gaming that flips areas.
And I’m not making anything up here: Dark Forest is a rollup. You play offchain, generate the proof, send it onchain, and it changes the global state. It works! It was the very first step in onchain gaming − and then, we forgot that the first onchain game wasn’t onchain.
Provable play-by-email games
We have a builder on Hylé who built a provable email game engine. You play offchain and generate proof that you won the game.
Read more about his project and zkChess here:
You don’t need to use Metamask to play this game. You just need an email address. It works! You can send simple instructions, and your whole email thread is this correspondence game.
Play-by-mail chess games were a whole thing a few decades ago, and people would pay two dollars in stampage at every turn − so the price for proving and settling a single proof of win is manageable.
Hylé for provable applications
If you want to build this, look no further: Hylé is designed for provable applications.
With Hylé, you run your game offchain, generate proofs, and verify them onchain. That’s it!
That's why I'm incredibly excited about the player chains and what Topology is doing. This is the only way we're going to reach critical mass actually playing any of these games. The blockchain needs to be optional.
So, at Hylé, we are a blockchain… that does fewer things. We verify zero-knowledge proofs, sequence transactions, and give you a tiny bit of data availability, and that’s it.
There is no execution environment. That's for you to build, depending on what you prefer. Maybe it's a centralized server, maybe it's client-side peer-to-peer. For your proofs, you may want to use Rust or Cairo − we’ll verify them all, and you are entirely free to do what works best for your game.