Chain Of Empires is a full on-chain, decentralised play to earn game. Every action in the game is a blockchain transaction, we leverage Polygon transaction speed to allow a smooth UX even for a full on-chain game. The user after registering is assigned a random territory with 200 units in the 32x32 map through Chainlink VRF and 250 Stamina(ERC20 non transferable). In the current state of Alpha the map territories are generated randomly and consist of 10% of Gold mines with a Gold(ERC20 transferable) amount between 100 and 500 and on 50% of the territories are present NPC units with a range of 10 to 50. The user can start expanding his empire by attacking nearby territories, every attack require to burn 10 Stamina, if a territory is empty the attacker will conquer it automatically, while if it has units(either NPC or other users) there will be a battle, the defender has a 30% bonus, so 100 units attacking a 30 units territory will result in the attacker conquering the territory with 61 units remaining. In the current Alpha users can claim 500 Stamina every 8 hours, but we have planned an update where stamina accumulates constantly at a fixed rate and can be claimed at any time, so that bot/scripts users don't have an advantage over less technical users. If a user conquer a Gold mine territory it will be able to mine gold every 3 hours(same Stamina changes planned), the gold mined is relative to the units in the Gold mine territory with a fixed cap. Special Attacks can be bought with gold, we currently have 3 special attacks available: Long Range Attack, which allows the user to attack a territory 5 blocks away, Area Attack, which allows the user to attack 9 territories at the same time up to 5 blocks away, Super Defender, which grants a 70% defending bonus to a user territory for 12 hours. The current objective of the game for the current alpha test is to conquer as much territory as possible, for the future we want to add more features such as more mineable/harvestable resources, craft-able buildings, more special attacks, we want to iterate and get feedback from our community, based on feedback and community voting we will evaluate if put our focus to build a full on-chain persistent metaverse or a full on-chain strategic round based game.

Chain Of Empires showcase

How it's made

Smart Contracts: Solidity 0.8.12, hardhat, typescript, typechain, EIP-2535 Diamond standard, Chainlink VRF, ERC20 ERC1155 OZ libraries, Polygon Mumbai, IPFS,, opensea, bnc-onboard, bnc-notify, alchemy. Frontend: React, typescript, chakra-ui, ethers, netlify, scss, react-zoom-pam-pinch.