project screenshot 1
project screenshot 2
project screenshot 3
project screenshot 4

FHE dark forest

Dark forest game built with FHE. Use FHE to simulate the universe to verify operations while reveal nothing about the information

FHE dark forest

Created At

ETHGlobal Singapore

Project Description

  • This project is inspired by the game Dark Forest: https://zkga.me/. It's a game originated from the concept "Dark Forest" in science fiction "3 Body". Where in the universe the civilizations in the space try to hide their activities and traces while advancing their techinology.
  • It could be a perfect use case for illustrating the concept of FHE. Using FHE we can create a decentralized setup for this game. When the spaceships travel in the space, the smart contract could compute the movement of the spaceship, without revealing it's exact location, which is exactly what FHE does.

How it's Made

Special FHE Attributes Utilized

  1. Encrypted Coordinates:

    • Player positions (x, y) are stored and manipulated as encrypted values.
    • Allows movement calculations without revealing exact locations.
  2. Secure Distance Calculations:

    • Combat and vision ranges are computed on encrypted values.
    • Players can interact without knowing each other's exact positions.
  3. Hidden State Updates:

    • Planet claiming and tech level increases occur without revealing which specific actions took place.
  4. Encrypted Comparisons:

    • Used for checking if a player is within range of a planet or another player.
    • Enables combat resolution without exposing player strengths.
  5. Selective Disclosure:

    • Players can query their own data and receive encrypted results.
    • Allows for client-side decryption of personal information.
  6. Homomorphic Operations:

    • The game state can be updated and verified without revealing the underlying data.
    • Ensures that the game rules are followed without compromising player privacy.
    • Arithmetic on encrypted values (e.g., updating positions, calculating distances) without decryption.
    • Enables complex game logic to be executed entirely in the encrypted domain.
background image mobile

Join the mailing list

Get the latest news and updates