# Lightpaper Pixel Invaderz Game V0.1
## Preface
This lightpaper will introduce the core game mechanics and content of the Pixel Invaderz Game. The planning and developing is still in progress, so things can still change anytime.
[TOC]
## Introduction
The Pixel Invader Game will be a decentralized NFT-game on the Solana blockchain. It will be a strategy, multiplayer game in the space genre. The game world consists of a single big galaxy, filled with solar systems which on their own will host stars, planets, moons and other celestial objects.
The player will settle on these planets to mine for resources, craft items, build economy and advance their empire. The player can either dominate the galactic empire with the strength of their industrial complex or build vast fleets of ships to conquer and raid opponents. Players can also work together and form alliances in a never ending battle.
To ensure long term player satisfaction the game will have a seasonal system which will not only shuffle the galaxy each season but will also introduce seasonal events and prizes that players can compete for!
## Rollout
The game will rollout in different phases. First we will create an **Alpha** version of the game on the devnet. After the alpha version is ready players will be able to test it. After this testing phase we will address all bugs, problems and changes to mechanics and content that we got in form of feedback from our community.
The next goal will be to create a **Beta** version of the game, which will contain additions to the game such as improved utility and content. Again we will make a test phase, take feedback from the community and implement it.
Both Alpha and Beta release should still be in Q1 2022.
After the Beta we will create the first version on the mainnet which will launch in Q2 2022. After the release of this version which will also start the seasons and will be called season zero, we will iteratively extend utility and game content.

### Alpha (minimum viable product)
* galaxy with solar system
* solar systems with stars (only cosmetic) and planets
* basic economy system with not more than 2 resources
* simple crafting system with items
* base building system with not more than 3-4 buildings
* usage of Pixel Invaderz to boost your empire
* first version of the galactic market
* no combat yet
### Beta
* add more resources
* add more buildings
* introduction of ships
* basic movement system intra-solar system and between solar systems
* integration of PIDs
* improved galactic market
* empire raiding system
### Season zero
* move to mainnet
* additional ships
* additional resources & items
* additional buildings
* integration of planetary NFTs
* seasonal reshuffling
* upgradable buildings
* ship blueprints
* adding science and science tree
* many more
After season zero release we will closely listen to the feedback of the community and plan a comprehensive development plan for the next couple of seasons.
## Core game mechanics
Here we will introduce our core game mechanics. Each of these game mechanics are still in progress and could still change or be removed. We could also decide to add additional game mechanics as we go.``
## Game cycle
The Pixel Invader game will be a multiplayer strategy game. Everything will be calculated based on a minimum timeframe which could be named "earth-day" or "galactic hour" and will be based on the blocktimes of the Solana blockchain. This allows for parallel gameplay across the globe as the Solana blockchain will solve many technical problems that we would have with normal game development.
## Seasons
We will structure the release of new features and content in seasons. In addition we will also have seasonal events and prizes based on certain events and leaderboards.
### Season Duration
At the beginning not every season will last for the same amount of time. This is mainly due to the development complexity and effort which will decrease over time, especially when the updates will more be based on new content than features and utility.
Typically I would suggest making a season between 4-10 weeks.
### Season Treasury
We need to measure the performance of every single player to reward the best ones in certain categories at the end of every season. This could be done by always monitoring all statistics and creating leaderboards for them, increasing the competitiveness of the game.
## Game world
### Solar system

The Pixel Invaderz game will be comprised of multiple servers, each representing a new galaxy with new solar systems and players. It is probably not technically feasible to have one server to host the entire game.
The basic foundation of the game will be solar systems that will have planets and stars in them. In the future there will be also additional stellar objects and NPCs roaming through the galactic neighborhood. These solar systems are connected by a web of interstellar travel routes. This is similar to stellaris and has some major benefits. It helps to set clear boundaries and will also help players to protect themselves better against enemies. It will also make interstellar travel easier to handle.
Stars and planets are used by the player to mine resources and build his economy.
A solar system can have between 1-3 stars.
Every solar system has between 2-8 planets.
As an additional source of resource and building space (and to make solar systems more complex) we could add moons and also other celestrial objects like comets into the mix.

**Some numbers**
Axi Infinity has around 1.5 million active players.
This means that the top game, although the market is not saturated at all at the moment and there is a ton of growth potential it already has 1.5 million players.
Taking 1.5 million as our best case we could need around 1.5 million planets if we expect every player to only have a single planet. Which will not be the case. I believe going with an average planet count of 5 planets per empire we will need in the best case scenario around 7.5 million planets.
If we say that we have an average of 5 planets per solar system we again have around 1.5 million solar systems that will be needed.
Introducing the concept of moons could further reduce the amount of planets that are needed. However I see the need to make planets a very high cap entity in the game.
This means we should also very carefully plan how many solar systems and planets that we will provide over time. I think that we should start with a rather small galaxy and should grow it season by season based on the amount of new players. We will also need to adapt our mean planets per user.
All empires and solar systems could be randomly shuffled at the end of every season.
#### Empire expansion
The player will be able to expand his empire one planet after another. As the solar systems are connected by an intergalactic network it will cost the player more to settle a new planet in a solar system which is further away from his empire.
### Planets

There will be different types of planets in the game. Every planet can house buildings and can be used to strengthen ones economy. Every planet will have a different size and different resource deposits making some planets better than others which will function as a rarity.
Planets will have resources that can be mined. Every type of planet could have some type specific resources or certain resources would be more present on a certain type of planet. e.g.: a gas giant has more "gas" - which is obvious
You can build infrastructure (buildings, space stations, ships) that mines, refines and uses these minerals to craft new items.
#### Mining
Example:
Planet A has
* X 100
* Y 50
1. you build a X mine
2. this X mine increase your turn based output of the material X
3. meaning you now make 2 X per time interval

You can mine in total 100 X from this planet. And the more you mine, the harder it gets. Every resource on every planet has a mining efficiency factor. This factor starts at 1 and it converges to 0 after some time - the factor is dependent on the already mined amount.
More rare resources would have a faster decay to simulate the difficulty of mining them.

## Buildings
Buildings need a certain amount of resources plus PIXEL token to be built. Buildings have different utility every building will have a detailed explanation at the time that it is released. We will be releasing more buildings over time.
Buildings also need upkeep in the form of electricity (upkeep).
Different effects of buildings (passive and active):
* mining effect
* crafting effect
* research effect
...
### Building system
Every planet will have a fixed number of tiles. These tiles will be used for the planetary building system. A player can place a building in each of these tiles. Every building can also be upgraded to increase it's speed or output.
Later on players will be able to rent or sell tiles on their planets.
Here is a rough sketch of how the building system could look like:

### Building types
Which buildings are available for a specific player depends on the research tree. Buildings can be upgraded, upgrades also have to be unlocked on the research tree.
### Undocking/Docking

One should never forget that buildings are also just tokens. This enables us to create a never before seen game mechanic of making buildings an asset. What does this mean?
Players will be able to "undock" buildings from a building slot and transfer their buildings to another planet or to the galactic market to sell them. The undocking will disable every passive and active effect of the building like mining and crafting as long as the building is not again docked to a building slot. The undocking and docking also costs a certain amount of PIXELs. Also there will be a cooldown period for every building that will determine how often this action can be executed.
There will be a maximum capacity of buildings on each planet.
There will be buildings on the ground and also in space.
There will be species-group specific buildings.
Pixies can be assigned to buildings to boost production. Also EMP tokens can be staked in buildings to increase production.
## Resources

### PIXEL
The PIXEL token is the main resource in the game. Everything you buy or build will cost some PIXEL. You can directly buy other resources from the galactic market with PIXEL or sell resources for PIXEL. You can also trade Solana for PIXEL and vice versa, as well as USDC or USDT.
When you buy something with PIXEL the PIXELs you spent will go partly to a burning-vault which will be emptied every 24h (plan for now) and the other part will go into our normal vaults and will be distributed throughout our ecosystem. This means that if you for example build a building and you destroy it within the first 24h of building it, you can get back your PIXEL and the other resources. Otherwise you will not be able to get back your PIXEL, but your resources. Of course here we cannot give back the fees that will be used to execute the transactions and smart contracts.
### EMP
EMP will be used to make the life of players in the game easier or to do enable certain actions. Also important to know is that EMP is no utility, meaning using EMP will not reduce the amount of EMP of the player but it will just lock up some EMP for a certain number of rounds. After this locking period the player can use his EMP again. For the sake of simplicity I will still refer to using EMP as paying, although it is just a locking mechanism.
As long as there is no DAO it makes no sense to implement the utility of the EMP token in game. But we can already provide users with the utility using a fake DAO token in the beta.

EMP can be used for:
* when a stronger player attacks a weaker player the imbalance in strength must be payed in EMP, the other way around is not possible
* you can pay EMP to reduce the amount of time that crafting takes
* one can also stash EMP on a planet to boost the production on this planet (here scaling is important)
* you can pay with EMP to protect your empire from attacks for a certain amount of time (however there must be a max amount of time that you can be protected every 24h)
* but of course you can also pay with emp to protect your empire for a longer time (when go to holiday) but in this case you will also not be able to play the game (with some small exceptions)
* you can decrease your amount of fees to pay in the galactic market if you own emp
### Minable resources
Mineable resources are resources which will need a special building to be farmed. Also you need the certain resource to be present on the planet or star. Here we still need to find some names. We should start with two mineable resources at the beginning.

### Refinable resources
Refinable resources are resources that need some form of refinery to turn one or multiple mineable and other refinable resources into another refinable resource. The refining process would also cost some pixel and energy upkeep for the refinery building. Refining a certain resource should also take a certain amount of turns or time.
Here we should also start with 2-3 refinable resources at the beginning of the game.
#### Refining table
We will also have to come up with refining recipes to determine exactly what it takes to produce a certain resource X.
### Utility resources

Utility resources are used to pay for a certain type of upkeep. A very simple example would be electricity which would add a certain complexity to the system.
**Problem: not enough energy**
Powering a mine. You have a mine and this mine costs you 1 energy per turn. Pay energy unit per turn to keep the mine running at 100% efficiency. If you don't have the energy creating a system where you basically shut down the industry linear.
This means that if you only have 90% of the utility resources (energy) to pay the upkeep of your buildings then they will only produce or mine with 90% efficiency.
$$\text{efficiency} = \text{clamp01}(\frac{E_\text{available}}{E_\text{needed}})$$
**Example:**
A player produces 9 energy and he has 10 energy left.
And he has 2 buildings each taking 5 energy upkeep every round.
So after the first round both buildings will have used the 10 energy.
Now only 9 energy will be produced, so randomly one of the buildings will get its 5 energy and will still function at 100%, however the other one only get 4/5 of its energy so the efficiency of this building will also only be 4/5.
### How many resources are there of a certain type?
For PIXEL there is a max supply, this supply is pre-minted and will be released into the public market/circulation over time with different methods (private sale, public sale, team, ...).
For all other minable resources, these resources will be inflationary. The current max supply is bound in:
* planets (every planet has an amount of resources that can be mined from it)
* the inventory of players
* game resource vault (to enable buying and selling of resources in the galactic market, to provide liquidity)
For all refinable resources, these resources will be inflationary. The current max supply is bound in:
* the inventory of players
* game resource vault
For all other utility resources, there is also no cap, the supply is bound in:
* the inventory of players
* game resource vault
For all resources besides PIXEL and EMP the system works as followed. If resources are used to craft or to buy all of these resources get burned to keep the current supply low. Although we have an inflationary token for every resource besides PIXEL and EMP it just makes sense to not create hyper inflation. In addition to the burning the game itself will provide liquidity on the galactic market if the supply in the market drop significantly or especially at the beginning of the game when no one has resources to spare. Also players will be able to trade one to one, meaning they can trade directly between each other which will be in-game trading (they will be required to pay a fee in pixels though, not happening over the galactic market). This system can also be extended by adding traders and merchants that travel the galaxy or visit your empire from time to time.
### Resource system
The resource system is global. If you mine e.g. 1 X at planet A you can use it where ever you want. This also means that you can trade (per one-to-one trade or via the galactic market) everything in your inventory.
There will be also the idea of having a maximum amount of resources that you can have. To increase this amount you need special silos and items to upgrade and boost the silos.
## Items
### Destructible items
There will be items that are destructible. They have utility, some of them are single use (they can have an effect, trigger some event or they are just here to craft another item), some of them can be used multiple times (but only in a certain solar system e.g.) and some of them give you a passive effect for X turns.
These items are clearly no NFTs, they are basically an inflationary token. They can be crafted with the help of other resources or other items. They can be bought on the galactic market or one-to-one trades.
What happens if an item is used? It just get's burned. - Yes and no, it really depends on the type of item.

### Crafting
Crafting is a process that takes in multiple resources and/or items and outputs another item. Crafting takes a certain amount of time, it can be but is only is certain cases instant. Crafting also takes some PIXELs and to craft items you need special buildings to do so.
Imagine a crafting or manufacturing building. This building can be upgraded to increase the crafting speed, or you could just stake EMP tokens in the building or NFTs, or other items to increase the speed and to lower the upkeep.
e.g.: with 10 GOLD and 20 PIXEL you can craft (over 2 turns) a battery - this battery has some effect
or it can simply be a crafting item that can be used for other things - like you need 10 batteries for building a ship
## NFTs

### Pixel Invaderz
The Pixel Invaderz are a collection of 10,000 alien leaders that will be crucial in the game.
For more details on the Pixel Invaderz themselves please have a look at the website.
For the game every Pixel Invader will be used to boost the general aspects of its profession. For that every Pixel Invader will get an additional set of stats that will be generated based on it's items and the rarity.
Imagine a scientist. Based on it's profession the scientist will help with research output of the empire. How much the scientist will help will be based on its other traits.
The species of every Pixel Invader will also play a big role.
As there are only 10,000 Pixel Invaderz their effects will be significant and will scale with the amount of players playing the game. This will make owning an Pixel Invader extremely important and only a handful of people will be able to have one.
### Pixel Drones
PIDs will be worker drones, a high supply NFT collection that will have local effects on your economy and other parts of your empire.
Compared to Pixel Invaderz they are the grunts. Players will be able to stake a number of their PIDs and planets.
PIDs will also have additional utility which will be introduced into the game later.
### Items
Of course there will be also NFT-items. These NFT items need to have a fixed maximum supply at the beginning. These NFT items will be introduced into the public circulation by either pre-minting and then selling them on the galactic market or by just making an NFT drop with candy machines.
The functionality of these items is different. They can have a passive effect, they can be used for staking in buildings to get advantages or the can be used for a certain event/effect. In every case the NFT will be not burnt. The NFT will just have a cooldown, this cooldown can be reduced by locking up EMP and after the cooldown is finished, the item can be used again. Some NFT will have no countdown. They can be used all the time.
Compared to destroyable items NFT will have passive effects or effects that need a cooldown before they can be used again. This cooldown can be reduced by locking up EMP tokens.
### Planets
Some of the planets in the game will also be NFTs. Only habitable planets where a player can build infrastructure on it can be represented as an NFT.
If a person holds a planet NFT this person will get a certain % of the output of the planets PIXEL and resource output. But only if there is economy on the planet.
We should make at most 100k planet NFTs, these planet NFT will be the perfect way for people to invest in existing empires and get passive rewards.
Planet NFTs will of course also have rarity and traits.

Some questions:
#### Distribution of planet NFTs
Each season a certain amount of new planets will be born and some of them will be NFTs. Around the time of every new season we will mint new planet NFTs and put them up on our galactic market. Or we will simply do candy machines.
We need to come up with a max supply of planet NFTs for every season.
### Ships
There are two main ideas behind ships:
Players will have a certain amount of ship types that they can build without owning any additional ship-nft-blueprint. In this concept buying ships as nfts will not directly give you ships but it will give you ship-blueprints which you can then use to build instances of these blueprints with PIXELs and resources. After buying a ship this ship will be a ship token of a specific type.
How many ships tokens a player can build from a certain ship NFT type depends on several factors like the amount of space dock and scientific research.
The full destruction of ships should be a rare case. In most cases a ship will get damaged and won't be able to fight for a couple of rounds. (This still needs to be discussed, we don't want too many ships to be destroyed)
To get more NFT-ship-blueprints the player will need to buy new NFTs.
Another similar concept would be to have a fixed number of ships, but NFTs will be basically parts that with which you can change your current blueprint. So the player would be able to design his ships that he wants to build by changing out the NFTs. This is a very common concept and the stellaris ship designer uses a similar approach.
## Trading

There will be three ways how a user can trade resources, items, NFTs and Pixel.
### NPC Trading
There will be NPCs (Traders) that visit your solar system from time to time. These traders most of the time have some awesome deals and you can sell and buy stuff from them.
### Player to player trading
Players can trade with each other in the game. This trading has some limits to reduce bad actors scamming people and miss-using the system. There will be still fees.
### Galactic market (GM)
The Galactic Market will be our own NFT, resource, item and token exchange. It should be similar structured like Star Atlas and the purpose is that players can sell nearly everything besides buildings. Also we will use this market to provide liquidity for resources and items so that players can buy them. We will be also buying items that other players sell to increase volume and kickstart the market.
On the galactic market you can do the following things:
* can trade PIXEL against everything
* buy usable stuff/items
* buy resources
* nfts
* of course sell all of this
* we can give back the royalty, but take the fee ***
* give people some rewards
#### Renting NFTs
In the Galactic Market people will also be able to rent out NFTs to other players and earn interest on them.
## Science

Every player will have it's own research tree. This research tree will contain research items that need to be unlocked to progress in the game.
Research will be produced by research buildings that the player will have to build and pay upkeep for. These research buildings will of course also have upgrades.
Researching a new item in the research tree can unlock new building options, upgrades, items and a lot of additional events and features in the game.
## Space travel
Travel between star systems should only work on the intergalactic highway which is a network connecting solar systems with each other. However in a solar system we need a different system, a tile based system. Ships will be able to travel a certain distance in the game. How far they can travel depends on the stats of the ships. Ships will also need upkeep. However they will have more upkeep when not docked to a space port or planet.
## Warfare

### Raiding
Raiding is a warfare mechanic that allows the player to be able to get resources and NFTs for successful raiding missions. To be able to raid the player needs ships that can execute the raiding and the player will need to stake resources or NFTs on his planet.
These staked resources are used to make raiding a risk reward game. The player will only be able to get the minimum between his staked assets and those of the other empire he raids.
Also the raiding force ships but also the ships defending a raided planet or system can take damage and can even be destroyed in certain instances.
The exact math behind raiding still needs to be addressed.
### Invading
This idea of undocking and docking buildings will also help us to design planetary invasions so that the invaded player can either sell the whole planet to the invader or just remove all it's buildings from the invaded planet if he doesn't want to defend the planet any more. This enables us to reduce the risk and the loss of PIXEL and resources on the side of the invaded party but still gives the invader a big price.
When the player buys a building this building will be saved in his in-game wallet as a token of the specific building. So in theory people can also trade buildings. All resources that were used to buy the building will be burnt. All PIXELs that were used will enter the burn and DAO vault. However this process is delayed by about 24h. So a player can still destroy a building and get back all the PIXELs 24h later. After this time the Player will only get back a certain % of the resources which will decrease over time.
### PVE
In the game there will be hostile and passive NPCs that you can attack and also interact with.
The difficulty of these NPCs is determined by the strength of the X nearest players, but they can also be placed randomly. Some NPCs will respawn and some will only appear once per season. Players that defeat NPCs will get prizes like PIXEL, resources, items, etc. But there will be also NPCs that players cannot attack but which will trigger events or the player can interact with them.
## Faction & Guilds
### Factions
Players will be able to choose from X different factions. We are not totally sure yet if players will be able to change their factions. At the beginning of the game factions will give you access to certain buildings, NFTs and benefits. Being in the same faction doesn't mean peace. Player can attack every other player even if they are in the same faction.
### Guilds
Players will be able to form guilds. If players belong to the same guild they can no longer attack each other, but they will get special guild bonuses and will get reduced fees when trading. Every season there will be prizes for the best and strongest guildes, if a guild wins this prize every member will get a share. Guilds will have a maximum number of players.
Factions and guilds may seem a little redundant. However factions will be a global grouping giving a player access to faction specific content and advantages.
Guilds on the other hand should represent more local alliances between empires. Also guilds will be far smaller compared to factions. Guilds can be created by every empire and will have a maximum number of members. The amount of factions in the game will be fixed by us. Every player will need to pick a faction at the beginning of the game. Perhaps players will be able to change factions later in the game e.g.: season based.