Inspiration

The online betting market has been growing steadily, for example The Netherlands just legalized online gambling in October. Blockchain technology adds an extra dimension and features, users can purchase tokens to play with or sell them on exchanges, transfer them freely to others, use it for various games. And the logic that determines the games outcome can be viewed by anyone, since the code is available online which creates trust.

What it does

Reelinvaders is a slot machine with a retro twist. It's part of Arcade Chain Games which can consist of many different games all using the same ACG token. After acquiring credits, they can be used to spin the reels. The chain will return a set of symbols and determines if the user wins new credits.

How we built it

The backend is build with the Lisk SDK and each game consists of a module and one or more assets. This makes adding new games to the Arcade Chain easy.

The frontend is created with JavaScript, NodeJS, Lisk client and React. It consists of a start page, where users can login and choose a game. And the ReelInvaders page, showing the reels, the paytable and the important "SPIN REEL" and "CASH OUT" buttons.

Challenges we ran into

.. is that the symbols have to be unpredictable by the user. One of the challenges when using random numbers in a blockchain world is that they have to be deterministic, each delegate node must come to the same conclusion. We've seen different solutions in past hackathons and this time the Mersenne Twister algorithm is used, which is a pseudorandom number generator. As a seed it uses the block height + seedReveal. To make sure new numbers and a new set of symbols appear faster, a blocktime of 5 seconds is set. This is still slower than rng's used in slot machines and more study is required to see if it's good enough. But as everything happens on the chain, the rules are the same for everyone.

Accomplishments that we're proud of

Everything happens on the blockchain! The symbols are determined on chain, the amount the user has won and even the enemies left from the bonus game are stored in the users account. It's possible to play ReelInvaders from the command line while interacting with the chain if someone wants to. But where's the fun in that.

It has the look and feel of a real slot machine Many videos were watched to see how a real slot machine acts and feels. We've added the sound of spinning reels and of winning credits. Easier would be to just flash some random symbols, but the roll of the reel and the little bump at the end is what makes it exciting.

The Space invaders bonus game

To make the game more interesting, we've added a retro space invaders like bonus game. The board starts with 12 aliens and each time the player rolls an "AMMO" symbol it fires one shot for each symbol. This happens automatically. If all enemies are removed the player gets 10 bonus credits.

What's next for REELINVADERS

  • Further study into an optimal paytable
  • Further study into prng on chain or faster blocktime
  • Adding more games to Arcade Chain Games
Share this project:

Updates