Overview

Matches

Matches are representing with bytes32 ECS entities. Their incrementing ID (ie. Match #1, Match #2…) is stored in a Table called Match.

This ID is used to determine which match an entity belongs to. For example, spawn points also have the Match component.

However, units do not have a Match component; instead their match ID is stored in the z-coordinate of their Position component.

Templates and Levels

Sky Strife uses a system of Templates and Levels to instantiate units and maps with default data. This is gas intensive and requires many transactions (this is why matches need to be “summoned”).

A Template is a list of table values. For example, a Swordsman template might have 100 health and 20 damage.

A Level is a list of templates. For example, the four player level might have four spawn points and 8 gold mines.

SkyPool and Tokens

The Sky Strife contract currently exposes a single ERC20 token called 🔮. It works like a regular ERC20, and can be sent between addresses:

https://explorer.redstone.linfra.xyz/token/0xB41e747bC9d07c85F020618A3A07d50F96703A78

This token is used to create matches and as a reward for winning. The reward for a given match is set when the match is created, and slowly decreases as more matches are created.

Related tables:

TokenMetadata, TokenSupply, TokenBalance, TokenAllowance, SkyPoolConfig

Gold

Gold is used to build units in a match. It is not tradeable or an ERC20 token.

As Gold linearly increases over time, we use a system called Stamina (legacy name) to “lazily” calculate how much Gold a player has. The mines that are player owns are given by the Chargee table.

When a player attempts to build, we iterate through all of gold mines that they own, and “harvest” them by multiplying the gold output of the mine, by the amount of time passed since it was last harvested.

Access Control