Giter Site home page Giter Site logo

ideal-lab5 / block-battalion Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 990 KB

A first-of-its-kind web3 game with an in-game event clock powered by timelock encryption

Home Page: https://blockbattalion.idealabs.network

License: Apache License 2.0

Rust 35.18% Shell 1.53% HTML 2.48% CSS 8.88% JavaScript 51.94%
cryptography timelock-encryption blockchain-gaming coin-flip commit-reveal multiparty smart-contracts substrate web3-gaming

block-battalion's Introduction

Block Battalion

Block Battalion is the first blockchain based game to use an in-game event clock using timelock encryption.

This is a work in progress. Expect some bugs.

Overview

Block battalion is a first-of-its-kind web3 game. As opposed to only leveraging a blockchain in order to immutably store ownership of in-game items or participate in the game, this game uses a blockchain (the ETF network) to drive the game forward.

Faucet

You will need to get some ETF tokens to play the game. Head to the discord faucet channel and get some tokens by sending a message @etf-faucet-bot !drip <your address>. If it is not working, ping @driemworks on discord.

Game Event clock

The game event clock is the main innnovation we are attempting to showcase with this game. It provides a way for many asynchronous players to trustlessly participate in a protocol. In existing architectures, commit-reveal structures are normally used for coordinating async players. In those types or protocols, each player commits to a value, then holds onto the real value for some period of time, and later on has to submit another transaction to reveal the value.

With the game event clock, we are able to relax this somewhat. Users leverage timelock encryption to encrypt their values, rather than broadcasting a commitment. The resulting ciphertext can be stored publicly, for example in IPFS (e.g. for a 'slow' clock) or directly in the smart contract (e.g. for a 'fast' clock). Players are no longer responsible for storing the original message securely.

Secondly, the game event clock is only partially-interactive rather than completely interactive, like the commit-reveal approach. The clock 'ticks' based on what is called a slot schedule, a list of slot identities in the ETF network's consensus. At each slot in the schedule, the event clock must be manually advanced by at least one transaction, but this does not require interaction from all players.

Gameplay

Current gameplay is limited. You can play it at https://blockbattalion.idealabs.network. It if isn't working, send a message on discord.

You can find a detailed description of current gameplay here.

Setup

See the individual directories' readmes in order for more detailed instruction on running and testing each component of the game. In general, the game works by deploying the contracts to the ETF network and using the ui component to interface with the contract.

ETF Network

The game works on the ETF network, which makes the timelock encryption scheme possible. You can read more about it here.

Contributing

Everything we do is open source and there is a lot of work to do. If interested, join our discord channel here and say hi, or send me (Tony) an email at [email protected].

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.