Updated: Mar 6, 2020
Post Scriptum CTG, the game that we are currently working on, is using Tangle. PS CTG is a turn-based strategy, in which the opponents send warriors to face each other on the battlefield, try to get to the enemy hero and eliminate him or eliminate all of his troops. This is a player versus player game, although you can play against a computer player, and the game is something similar to checkers mixed with collectible card games.
We would like to talk more about things that we are working on.
In this article we will talk about Tangle, the technology that we use in our game.
We need Tangle in our game to help us with several things: replace a dedicated server for players, and deliver defense from hacking to provide an honest fight.
What is Tangle?
Tangle is described as the successor of blockchain. In some sorts Tangle is a type of directed acyclic graph, or DAG, which must first be understood in order for the Tangle itself to be understood.
What is a Directed Acyclic Graph (DAG)
In simple words it is dots with lines pointing to other dots where the lines do not form cycles.
DAG is a data structure that is represented by vertices (nodes, squares) which are then connected by edges (arcs, arrows).
Directed means the connections have a direction: A -> B is not the same as B -> A
Acyclic means "non-circular" . Moving from node to node by following the edges, you will never encounter the same node for the second time.
A good example of a directed acyclic graph is a family tree.
Another example of a DAG can be found in an illustration below:
This method of structuring data in a DAG format forms the basis of the Tangle.
The game also uses Operator in communication with Tangle. The Operator's task is to matchmake players (two, subsequently more). The Operator creates game rooms in Tangle, in which game sessions take place. To start the game, players publish the corresponding entries in Tangle. The Operator monitors the Tangle for the appearance of such records, and when this happens - creates a chunk with the game in Tangle. Directly, the player and the Operator, as well as players with each other, do not connect: all communication takes place via Tangle.
To play with friends via Steam, the Operator is not used, players connect using the Steam API.
Chunks are pieces of information that are written in Tangle. They are somewhat similar to blocks in the blockchain. In the blockchain, only one record can be attached to one record, in Tangle one record can be attached to two records. A blockchain may contain many related transactions in one block. In Tangle, you may write only a part of it in a chunk. The speed of creating one block in the blockchain can reach up to 10 minutes, in Tangle it can be done much faster, in seconds.
In the blockchain, only one record can be attached to one record, in Tangle one record can refer to two records, and an unlimited number of other records can refer to one record.
In the example below, record 1 refers to two records: 2 and 3. Record 6 refers to several records: 2, 3, and 4.
This is it for now, in the next article we will talk about the Merkle tree and hashes, and how they relate to our project.