Hi all, first post. New to Stacker News, apologies if the format's off.
I built BlockForge, a Minecraft-ish voxel world where the engine, the 32x32 chunk grid, textures, skins, and player edits are all Bitcoin inscriptions.
Users can build on a chunk, and make the changes permanent via parent-child inscription.
It's built with THREE.js WebGPU, and runs natively in browser on desktop & mobile.
A couple of details I had fun with:
- The whole world reacts to live BTC data: block height drives day/night cycle, transaction count and fee rates drive weather events & cloud density, plants live on a block cycle.
- Real-time Multiplayer runs through a WebRTC relay whose address is anchored on a Bitcoin sat (so the relay box is rotatable without re-inscribing the engine)
- The entire game is a single HTML file stored on-chain, pulling in library dependencies via recursion.
Check out the website https://blockforgebtc.com if you want to learn more! Free to walk around as a guest, no wallet needed.
Happy to answer architecture or implementation questions, and open to any feedback! Thank you!
Why... This is going to become far too expensive to be a game in the future...
However, I will applaud the effort. It's actually pretty awesome. A good educational experience for sure. But I don't think a game built on UTXOs as building blocks is the most efficient way to build a game world.
I'm more interested in the technicals of the server engine client relationship.
Hey, thanks for the comment and the kind words!
In terms of prices, you'd be surprised. The full Engine is about 800kb, with Brotli compression that comes down to 150kb, so it costs ~$10 to inscribe a new version of the engine at current fees. The biggest complexity here is getting the entire game engine that small (all block definitions, animations, collision, interactions, etc).
When users complete a build, they inscribe updates to their entire chunk as a single JSON.
For the server/engine/client side, there actually isn't a traditional server distributing the engine or holding state. The architecture is closer to "peer-to-peer through a thin relay" than client-server.
ordinals.com/content/<iid>). No server of mine is involved in serving the game code./r/sat/<sat>/at/-1. If my box dies, someone could spin up a new relay and re-anchor the address on that sat, and every inscribed engine would just pick it up.So If the relay goes down, you can still play solo and inscribe permanent builds. If I disappear tomorrow, every owned chunk and its history remain, the engine still loads, and someone could resurrect multiplayer.
very cool. you should use nostr relays for peer discovery.
Also that's what it costs now. But I think in the future that's going to cost a lot more.
Thanks! I actually initially built this out with Nostr for peer discovery, but all Ordinals explorers block Norsr's websocket connections. The inscribed engine can't reach Nostr relays.
WebRTC datachannels aren't goverened in the same way, so the relay I'm using now was the only architecture that would work on ordinals.com.
The relay's connection details are publicly viewable a Bitcoin sat so the box itself is replaceable by anyone, which is the most decentralized I could get given the context.
Also yeah its very possible it gets more expensive in the future, but you could argue that would just make the builds already inscribed even more valuable.
I'm pretty ignorant when it comes to inscriptions. Can you explain a little what inscriptions add to the game?
Hey, thanks for asking! Totally fair, inscriptions are easy to miss the point of until you see one used for something concrete. Inscriptions are arbitrary data stored permanently inside Bitcoin transactions. Think of it as forever-storage that needs no server.
For BlockForge specifically, they do three things:
tl;dr: The game world is not stored on a private server. If Bitcoin's running, BlockForge is running.