Gemstone Builders
A Factorio inspired game living on the blockchain! The players can keep their factory designs secrets and build the global resource economy!
Created on 19th May 2024
•
Gemstone Builders
A Factorio inspired game living on the blockchain! The players can keep their factory designs secrets and build the global resource economy!
The problem Gemstone Builders solves
It's a game - it's hardly solving any real problem. But it is an original take on an established formula. Factory games are numerous nowadays but none have yet attempted to decentralize nor to give the players the ability to control the game economy.
By utilizing blockchain & ZK we can allow the players to keep their factory state secrets while still participating in the global game.
The players are free to spend the resources they've mined/produced as they please since each resource is an ERC20 token that can be traded freely.
Players can even choose to mass burn certain tokens if they believe that would benefit them.
Challenges we ran into
ZK Circuit in Circom
ZK Circuits are a difficult beast. They are more simmilar to logic circuits than regular programming.
A significant challenge in this project was encoding the game logic in a ZK circuit. We overcame it by utilizing lessons learned from logic circuit classes (from ages ago). However, the resulting code is difficult to navigate and expand upon.
Moving forward I would consider circuit language or build a system to generate circuit code.
Writing the smart contract and ensuring proper state transitions
The smart contract code was another bit that wasn't entirely straightforward. With the factory, resource state and ERC20 tokens there are a lot of moving pieces that need to be taken care of.
Onboarding
Ensuring that people have an easy time joining the game is a difficult in and of itself.
Our solution is two fold:
- We host the frontend on the https://gemstone.builders domain so that players don't have to host it themselves
- We provide an almost ready to use docker image that anybody can start on their machine
This is far from perfect, one thing that I'd like to avoid is forcing the user to run the client locally by exploring in browser proving.
Tracks Applied (4)
Global Bounty
Aleph Zero
Product Path
Aleph Zero
zkEVM Stack Extension
Polygon
Prizes for Finalists, Hackers' Choice & Chewing Glass
Cheer Project
Cheering for a project means supporting a project you like with as little as 0.0025 ETH. Right now, you can Cheer using ETH on Arbitrum, Optimism and Base.