Xaya is a blockchain gaming platform that attempts to solve the scalability problem and allow for full decentralization in games. There are currently four games available on the platform in pre-alpha or demo form, and more are in the works.
This article will explore the basic features of the Xaya platform, including human readable names, separation of game moves from core rules, ephemeral timestamps, and other features. It will also give a brief description of current Xaya games.
Until now, most “blockchain games” have been primarily run on a central server. In these games, only certain transactions are recorded on a blockchain.
For example, in Gods Unchained, all purchases of card packs are recorded on the Ethereum blockchain. But the game itself, the actual gameplay, takes place on a central server provided by the developer.
For another example, many transactions in Etheremon are recorded on the blockchain. But battles take place initially on the developer’s server.
Only after some time has passed does the developer’s site link up with the blockchain and record the outcome of battles.
In contrast to these Ethereum games, Xaya attempts to create a platform in which developers can create completely decentralized games. These games not only have collectibles stored on the blockchain, but also the entire games themselves run on decentralized networks.
Xaya’s Precursor: Huntercoin
Before Xaya was produced, the developers initially created a single game called Huntercoin.
In Huntercoin, each player controlled a character called a hunter. The hunter could be moved around a 500 X 500 game board. On this board were coins that could be collected by hunters.
These coins were an actual cryptocurrency called Huntercoin, and could be traded freely in the marketplace.
Hunters could also fight each other on the gameboard in order to advance to a particular spot where a coin spawned.
In Huntercoin, the game state consisted of three pieces of information:
- The position of each hunter on the map
- The position of each coin on the map
- The balance of coins possessed by each hunter
If a player wanted to make a move, he would send a transaction message. This transaction would be bundled into a block and added to the blockchain through a Proof of Work (PoW) consensus protocol.
Since the blockchain contained a record of every move in the game, the current game state could always be derived from the information contained in it. The game client running on an individual player’s computer used this information to create a graphical representation of the game world.
This proved that it was possible to run an entire game on the blockchain.
However, as with most other blockchain games, the team ran into problems with scalability. The rules of the game had to be changed several times to discourage players from engaging in too many transactions.
The success of Huntercoin emboldened the team to move forward with a full gaming platform. However, it also encouraged them to work to solve the scalability problem. The full Xaya platform is a result of their efforts to do this.
Xaya addresses and names
In Xaya, each address can register one or more human-readable names. The transaction registering the name is recorded on the blockchain through a PoW process.
All game assets and coins are owned by a name, not an address. Therefore, players do not need to cut and paste 256-bit addresses. If a player wants to send an asset to another player, he only needs to know that player’s in-game name.
Two different scalability problems
To solve the scalability problem, Xaya developers had to distinguish between two different versions of the problem.
The first version occurs if there are too many games being processed on one network. For example, let’s say that there are only 10 players in each game, but there are 1 million games on the platform.
This could result in billions of transactions per second, causing the network to lag or crash.
The second version occurs if there are too many transactions in one game. For example, perhaps there is only one game on the platform, but this game is so popular that it has 10 million players. This too could result in billions of transactions per second, potentially crashing the network.
The following two sections will describe the team’s solution to each of these two scalability problems.
Solving the problem of too many games
To solve the problem of having too many games on one blockchain, the team opted to have only four types of transactions require confirmation from the whole network: the creation of CHI (the Xaya native cryptocurrency), transfers of CHI, registration of names, and changes to the value of names.
By contrast, moves within a game-world must only be confirmed by the nodes that are interested in a particular game, such as exchanges that carry that particular game’s currency or players of the game who happen to be running a Xaya node.
All moves within a game are recorded to the Xaya blockchain. But unless a particular node is interested in a game, these moves are just written to the chain for historical record-keeping purposes. The network as a whole does not have to compute the validity of each and every game move.
For this reason, a virtually unlimited number of different games can exist on the Xaya platform without slowing down the network. This is how Xaya solves the problem of having too many games on one network.
To solve the problem of having too many players on one game, Xaya uses game channels.
A game channel is a smaller network that computes the validity of each move made within a game, then tells the broader game network the outcome of the total series of moves.
The Xaya blockchain still records every move. Game channels simply allow these moves to be recorded without their validity being computed by every node interested in the game.
Game channels are generally used for individual games between a few players. For example, a game channel may be used to compute moves made within a single battle of Treat Fighter, while the nodes interested in Treat Fighter use the outcome of these battles to compute the state of the entire game-world.
This solves the problem of having too many transactions occurring in one game, since the nodes interested in a particular game still do not have to calculate every move made in every iteration of the game.
Instead, they must only calculate the validity of major moves such as wins or losses. This cuts down on the use of bandwidth and helps to relieve network stress, leading to faster speeds and lower transaction costs.
Dealing with cheating
In a game channel: if an honest player encounters an opponent who cheats by refusing to verify the outcome of a single game, the player can issue a dispute transaction. In this case, the current game state as of the latest move is submitted to the network.
Once this is done, the opponent has a chance to respond by reconnecting to the game and making another move where the last one left off. But if he does not do this, the dispute is resolved in the disputer’s favor.
In this case, whatever rewards are up for grabs are awarded to the disputer.
A dishonest player may attempt to force an opponent to pay transactions fees by repeatedly disconnecting. So to prevent this from happening, Xaya implements ephemeral timestamps.
Any player can choose to have individual game moves be timestamped by nodes on the game’s blockchain. This timestamp consists only of a merkle root hash, so it doesn’t take up much space on the blockchain.
However, in case of a dispute, this timestamp can be used to prove that the player’s opponent knew the current moves of the game, or at least that he could have known had he cared to.
The player does not pay a fee to the nodes to record the timestamp. Instead, the player promises to pay a fee if the timestamp is used later to resolve a dispute.
For this reason, miners are incentivized to record the information, but the player doesn’t have to pay for it except in the unlikely event that the opponent turns out to be dishonest.
Ephemeral timestamps will only be used if an opponent is deliberately forcing the player to dispute game actions the opponent knows to be valid. In the vast majority of cases, games should be certified by both players without dispute.
In the few cases where a dispute occurs, it should be resolved through the normal dispute process. Only in those rare cases where a truly malicious player is encountered should ephemeral timestamps be necessary.
Games on Xaya
Xaya is a fairly new blockchain gaming platform. But there are already four games available for it that have pre-alpha releases or demos.
Here is a list of the current games on Xaya.
Taurion (public pre-alpha demo)
Taurion is a real-time space strategy game. Players can mine resources, fight other players to capture mines, earn xp, gain levels, and build ever more powerful vehicles. They can also build structures to become even more powerful.
Soccer Manager Elite (closed alpha)
In Soccer Manager Elite, players take on the role of a manager, shareholder, or agent of a soccer club or athlete. The goal of the game is to succeed in the soccer business.
A manager needs to attract fans who will buy tickets day after day. But he also needs to avoid spending too much money on his team’s players.
Treat Fighter (public pre-alpha demo)
In Treat Fighter, players cook up animated treats, then send them on missions to collect candies or fight other treats in the coliseum. If a player’s treats aren’t doing a good enough job, he can deconstruct them to extract valuable candy.
Treat Fighter is a ruthless game of every sweet for itself.
Xayaships (public demo)
Xayaships is Battleship on the blockchain. The player arranges his Xayaship secretly on the battlefield, then calls out coordinates in an attempt to sink his opponent’s ships. If he sinks his opponents’ ships before his own are sunk, he wins!
Is Xaya the next big thing in blockchain gaming? It’s too soon to tell. But it certainly has an interesting solution to the problem of scalability.
In this article, we’ve gone over the main features of Xaya, including human-readable names, ephemeral timestamps, and more. We’ve also listed some games that are available on the platform.
We hope this information has helped you to decide whether to get involved with Xaya further or whether to try out any of its games.
Do you think Xaya is the solution that will finally allow us to have fully decentralized games? Or are we better off using Loom Network or Matic Network? Or, is the true scalability solution coming in the future?
Let us know what you think in the comments below!