HomeBlockchain Platforms & EcosystemsXaya: Is Full Decentralization Finally Here?

Xaya: Is Full Decentralization Finally Here?

-

xaya

The Basic architecture

XAYA platform is basically a blockchain and an off-chain computational engine.

As for the blockchain, it is essentially a two-tiered blockchain.

  • Layer 1: the CHI (and Names) layer, which is singular and global across the blockchain
  • Layer 2: the Games running on top it, with only the Moves on chain — and thus, you dont need a global consensus for gamestate

And one off-chain layer: Game State Processors, or GSP running locally calculating game-state per game

TLDR:

  1. No singular global on-chain state but a global off-chain state per game, i.e. states are off-chain and per game
  • game-state decoupled from moves
  • computing the state of a specific game done locally by nodes involved/interested in that game

2. Game channels w/ ephemeral timestamps 


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.

Full decentralization

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

huntercoin
Source: Xaya.io

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:

  1. The position of each hunter on the map
  2. The position of each coin on the map
  3. 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.

huntercoin map
Source: Xaya.io

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 issues.

The first problem occurs if there are too many games being processed on one network. For example, let’s say that there are 100 games running on the platform.

This could be computationally too expensive for one node causing the network to lag. E.g. If each node has to compute the state of 100 World of Warcraft games then it may take hours to process the state of all of the worlds (longer than the block times themselves).

The second problem is related to blockchain bloat and also the speed at which games play. For example, perhaps there is only one game on the platform, but this game requires billions of transactions in a short time. This would bloat the chain, fill blocks, cost lots in fees for the player and make the gameplay really slow.

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 complex 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 only need to be verified by the nodes that are interested in that 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. The network as a whole does not have to compute the validity of each and every game move.

Only those whom are interested in the game need to compute its current state by reading all the moves in the blocks.

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 as without this it would be computationally too expensive for every node/miner to compute the states of many complex games.

Game channels

To solve the problem of having slow games that are limited by block times and to reduce blockchain bloat (and transaction fees), Xaya invented the concept of Game Channels.

A game channel is a smaller network that computes the validity of each move made within a game real-time with multiple players, then tells the broader game network the outcome of the total series of moves.

Game channels are generally used for individual games between a few players. For example, a game channel may be used for a game of Chess in which the players sign their moves and send them directly to each other and then only the winner needs to publish the winning move and potentially the loser’s last signed move and state to the blockchain. Chess is the most basic example. 

This solves the problem of having too many transactions occurring in one game, since they are completely off chain.

Instead of computing what is happening in the game itself, nodes must only calculate the validity of major moves such as wins or losses. Of course, the players who are in the channel will be computing the state realtime.

Essentially complex games can be sharded into many games (or instances) – this allows for real-time gameplay whilst remaining trustless, decentralized and also while massively reducing blockchain bloat and transaction fees.

Dealing with cheating

cheating solution
Source: Xaya whitepaper

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.

Ephemeral timestamps

A dishonest player may attempt to force an opponent to pay transaction fees by repeatedly disconnecting or causing other disputes in an open channel. 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. An arbitrary number of timestamps consisting only of a merkle root hash can be added to each block, so this 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. 

However, in those cases, ephemeral timestamps guarantee that the honest player only pays transaction fees if they will actually win the game as a result, in which case the malicious player will be slashed and they will be refunded for the necessary fees.

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
Source: Taurion.com

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)

soccer manager elite
Source: SoccerManagerElite.com

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)

treat fighter
Source: Xaya Medium blog

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
Source: Xaya YouTube channel

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!

Xaya conclusion

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!

Tom Blackstone
Tom Blackstone
Tom Blackstone is a former salesperson turned tech writer. Before 2014, he sold video games, computers, home theater systems, and other entertainment products. Since 2014, he has been a full time writer. His previous work includes ICO announcements, articles on the history of cryptocurrency, guides to Kodi addons, and more. He has always enjoyed learning about new technology and helping others to understand it. As a former video game salesperson, he also likes to try out new games and review them for others.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

X