BattleShips

Blockchain Game on Echo Smart Contracts

  • Blockchain Game
  • Cryptocurrency
  • Unity
  • Smart Contracts

A web-based blockchain game inspired by the legendary ‘Battleships'. The game allows betting in crypto, while smart contracts guarantee a fair outcome.

June 2019 – July 2019

Work done

  • Web-based blockchain game
  • Smart contract protocol
  • VRF encryption
  • UI/UX and graphics design

Vision

Keeping your battleships location top secret is the key point in the strategy of the well-known Battleships board game. However, a typical digital version of the game is normally hosted on a centralized server that also acts as a third-party mediator, controlling proper execution of the rules.

The team at the PixelPlex blockchain game development department identified common fairness issues and was excited to try porting the game to a decentralized platform while also transforming the traditional design of the Battleships playboard.

BattleShips Project Objectives:

  • Digitize the classic game of Battleships and make it run on blockchain;
  • Prevent in-game parameter manipulation and malicious attacks;
  • Ensure connection stability and high-speed performance;
  • Enable financial value for players: bets and rewards in cryptocurrency.

Solution

BattleShips is a fully-functional implementation of the traditional Battleships game, built on Unity and enhanced through blockchain technology. The underlying ecosystem and smart contract protocol we used is Echo, a large blockchain project developed by PixelPlex in-house engineers.

Powered by Echo Smart Contracts

The game is organized in the form of classic PVP battleship tournaments. Our team of blockchain game development specialists integrated the game mechanics with the Echo smart contract protocol to enable the validity of all the transmitted and stored data, player authentication, and ship position verification.

The PixelPlex team built custom smart contracts to augment the game logic with the so-called “incorruptible arbiter”, taking over the game rules enforcement throughout sessions of playing the game. The protocol requires users to place their bets in cryptocurrency before the game starts, and makes it impossible to affect end results.

Verifiable Random Functions (VRF) Encryption

To ensure that no user can brute-force the uploaded info about the shipboard layout, the encryption process is done through Verifiable Random Functions (VRF). The properties of the VRF sustain all the benefits of blockchain-based digital signatures, but with an additional feature: the signature is totally unique for each move made during the BattleShips game round.

Strong encryption coupled with the Echo smart contract code ensures the validity of input-output transactions and helps keep battleships’ location secret.

Echo BattleShips Game Features

Here are some unique features of our BattleShips blockchain game:

  • No one can read the info uploaded by the player to the blockchain; 
  • The game cannot begin without placing cryptocurrency bets;
  • The winner receives all the deposited crypto reward at the end of the game.

Once the locations of all battleships are revealed, a smart contract executes a direct transaction of the initially deposited amount of cryptocurrency to the winner of the battle.

Features

  • 5 battleship design sets with unique animation
  • 3 different battlefield locations
  • Strong cryptography-powered PVP battles
  • In-game deposits in cryptocurrency for game bets

Technology

Unity

Team

  • 3D Game Artist
  • Blockchain Developer
  • Unity Developer
  • QA Engineer
  • Project Manager

Duration

2 months

More projects