Skip to content

Implement a chess game in Hydra head #1098

@ghost

Description

NOTE: Re-iterated this into multiple increments, the first being:

Why

  • We want to "eat our own dog food", eg. use the technology we are building on a daily basis in order to:
    • Test our own stuff
    • Improve the overall user experience, even though developers can tolerate more complex UIs than the average user
    • Experience running an app/system
  • Games where plays are run in a Hydra head with only results/leaderboards being kept on L1 seem a good use case for Hydra Head protocol
  • Chess being a well-known deterministic game, with simple rules, few players, easy to build interface, is a good candidate
  • Yet it's also challenging to provide a great UX so that it's fast and easy to setup a game
  • We want to improve the DX for people wanting to build stuff on top of Hydra, this app will be a "reference DApp", something we can point people at and refer to when improving Hydra

What

  • Implement an application that allow 2 players to play a Chess game remotely in a Hydra Head and record the result on L1
  • The application should be easy to install even for users unfamiliar with cardano-node and hydra-node
    • Having a short and sweet README.md on a dedicated repository (e.g. hydra-chess) could be a good goal post here.
  • The UI provided can be a simple TUI or even a CLI, but there should be a proper API to make it easy for anyone to build a proper UI, whether web-based or for desktop deployment
  • A player should not be able to Close the head to avoid losing a game
  • It must be possible to play on mainnet with minimal funds, eg. playing a game should cost a minimal amount of ADAs

Acceptance criteria

Here is the basic scenario this feature should cover:

  • Two users want to play one or more Chess game using Cardano
  • They can build the hydra-chess on their machines or download pre-built binaries when/if available
  • They run the hydra-chess application locally selecting which public network to run on which provides some command-line interface
  • They can exchange connectivity information provided by the interface and use that to configure known peers
  • Once peers are configured on both sides, they can
    1. initialise a new head
    2. start a new game once the head is opened
    3. play game using some simple interface and board display
    4. see the result of the game
    5. start and play one or more other games in the head
    6. close the head once they don't want to play anymore
    7. have the game(s) results be reflected on L1

Requirements:

  • OS support limited to Linux/Mac OS
  • Users should have a good knowledge on their machine and network configuration (eg. be able to tweak firewall to let other people connect to their node)
  • Application should be easy to download and build (eg. easier than say cardano-node or hydra-node)

Metadata

Metadata

Assignees

Labels

💬 featureA feature on our roadmapappAn application or tool built on top of Hydra Headred 💣 💥 ⁉️Very complex, risky or just not well understood feature

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions