Xayaships is a blockchain version of the classic naval warfare Battleship game. Battleship has been around since at least the 1930s, but it was in 1967 that Milton Bradley created the plastic board and peg version that most people are familiar with. Its rules are relatively simple but gameplay is relatively quick and perfect to demonstrate the cutting edge Game Channels technology that Xaya allows.
There are many different variations on the rules for Battleship. Xayaships adopts a simple set of rules that are in common use.
When calling a shot, if it’s a hit, the hit is noted but which ship that is hit, isn’t. Also, after a hit, that player gets to fire again. As in all variants, when all ships are sunk on one side, that side loses and the opponent wins.
Blockchain suffers from many drawbacks and the most commonly spoken about is scalability.
Scalability for blockchain gaming means a few things:
1. Transaction speeds
2. Blockchain bloat
3. Game complexity
The latter is solved by the unique method of how game states are computed on the Xaya platform.
The first 2 are solved with game channels technology. Read on.
Game Channels are a major technological achievement for blockchain. The academic paper can be found here. They facilitate near infinite scalability for games or dapps running on the blockchain and allow near real time gameplay (limited by network speeds).
Xayaships demonstrates Game Channels for developers and shows how they can create near real time games that run entirely on the blockchain in a trustless and decentralised way. With respect to the Xaya platform, Game Channels can be thought of as individual payment channels that games run in.
They work by submitting a special transaction on the Xaya blockchain that creates a channel which other players can join. For Xayaships, when a channel is opened directly between 2 participants, real time gameplay can begin. In game channels the number of transactions can be unlimited, for free, and the speed is only limited by the network latency between the 2 players. Once a game is complete the winner can prove he won by posting the state to the blockchain. The other player can try to dispute it, but in the end the real winner will win as he has all the signed moves of the other player which prove he lost.
In all, a complex and real-time game can be played in a trustless, decentralised, provably fair way with little transaction fees and massively reducing blockchain bloat.
Latest download installer > https://downloads.xaya.io/InstallerXS_0.2.0.exe
This installer is for windows and includes an intergrated electrum wallet. Get in discord for some free coins or free account so you can start playing.
Choose simple mode if you don’t know what you are doing for a “litemode” experience.
This is still a Tech Demo.
Instructions / Guide > https://github.com/xaya/xaya_tutorials/wiki/Xayaships
Unity Front End / GUIs (updated to 0.1.2 fixes pathing issues on windows). 0.1.3 improves performance.
Windows (includes prebuilt backend binaries) > https://downloads.xaya.io/xayaships_win_0.1.3.zip
Linux – you will need to build libxayagame and sudo make install and sudo ldfconfig for this to work > https://downloads.xaya.io/xayaships_linux_0.1.3.zip
Mac – untested – but you will at least need to make libxayagame and install etc (will have issues with names with spaces) > https://downloads.xaya.io/xayaships.mac.0.1.3.zip
Xayaships is fully open source and is included in the libxayagame GitHub repository here. If you build libxaygame it will build shipsd and the ships-channel executables.
Instructions for building libxaygame for Windows and Linux are here:
More information can be found here
For developer or user support, visit our forum or Discord channel for developers.