Inspiration

It's hard as hell for indie bands to make money these days and it's the fans that suffer the most! EtherBandBattles solves the problem of getting badly needed funds into the hands of starving artists by letting fans compete in an Ethereum based Battle of the Bands. It's also a tremendously fun way for fans to introduce new music to each other in a friendly social venue.

What it does

Each user submits a video of their favorite band, hosted on YouTube, and pays their entry fee to the game in Ethereum. In real-time, they watch together each of the videos they submitted, one at a time. Each player marks the spot in the video that they feel everyone will like the best, without knowing what spot the other players picked. When everyone has made their choice the round completes. The game server calculates the winner of the round by determining which person picked the spot in the video that is closest to the average of all the player's choices. That player wins the round and is awarded the non-fungible token assigned to that round's band video.

All the tokens are stored on an Open Zeppelin ERC721 contract. Then the game server loads the next video into everyone's YouTube player via a broadcast made over the PubNub network that connects the players and links their video players. All the players compete to win this new round and the players can also chat with each other over the PubNub network while they are playing.

When all the videos have been watched the game is over. The game server publishes the list of winners, along with the IDs of the videos that each player won, to the ERC721 derived smart contract. The contract then pays out the winnings based on the following formula:

5% of all the funds goes to the "house" for administrative & development fees.

The remaining funds are paid out as follows:

50% is split equally over the number of participating bands

Of the remaining 50%, the following formula is used to calculate the payout for each player:

(Number of rounds won / Number of videos) * remaining funds.

Here is an example using a sample game with 3 players: Tom, Ann, & Stacy. This means that there are 3 bands and that means there are 3 videos:

Stacy wins 2 of the rounds

Tom wins 1 of the rounds

Ann doesn't win any rounds

With these facts the payout would be:

Stacy: Gets 2/3 of the funds reserved for the players

Tom: Gets 1/3 of the funds reserved for the players

Ann: Gets the sheer ecstasy of having helped raised funds for her favorite band

The motivations behind these game mechanics are:

  • The players know that no matter what happens, they will have helped raise money for the band they sponsored since the bands always get paid.

  • But, they still have fun competing with each other trying to win each round, and therefore win some extra Ethereum

  • They are introduced to new music from the other players bands in a fun, social manner

  • By trying to guess the video location that will be the most popular with everybody, instead of just picking their favorite spot, they are coaxed into looking more intently at each video in a way that encourages empathy and greater attention to the content.

How I built it

  • I used Node.js for the web site and to interact with the Ethereum network via Web3.js.
  • I used the PubNub real-time messaging network for the server broadcasts that execute the game mechanics, which include interlocking the video players for real-time synchronized playback and notifying the players of the game results in a push notification manner.
  • I used the indispensable Open Zeppelin smart contract library as the foundation for the smart contract that backs the game. In my case, the Open Zeppelin ERC721 contract.

Challenges I ran into

Coming up with the correct ideas to make the same smooth and enjoyable.

What I learned

Ambition is the root of all late night programming sessions and sleeplessness.

What's next for EtherBandBattles!

New game versions and multi-language support.

Built With

Share this project:
×

Updates