Gemstone Builders

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:

  1. We host the frontend on the https://gemstone.builders domain so that players don't have to host it themselves
  2. 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

Our factory simulation game uses Zero-Knowledge (ZK) proofs and blockchain for a decentralized, private gaming experienc...Read More

Aleph Zero

Product Path

Our factory simulation game aligns with Aleph Zero's Product Path Track by leveraging Zero-Knowledge (ZK) proofs and blo...Read More

Aleph Zero

zkEVM Stack Extension

We built a pretty complex ZK circuit using circom. The circuit validates a state transition from one state of a player'...Read More

Polygon

Prizes for Finalists, Hackers' Choice & Chewing Glass

For the Finalists track I think you'll notice that we've built an almost finished product. It's a game! That anyone can...Read More

Discussion