Introduction:

We create a Solidity contract that allows OG Loot owner and mLoot owner can use their adventurer bags to battle with each other. This contract will reward the player who win the battle based on their loot and loot derivatives (will launch later). We hope our battle game experiment will help and inspire builders and community members to create more interesting experience on top of our “lego piece”.

The project would work as follows:

Stake and Cross Chain

We will provide a place to allow both OG Loot and mLoot owner to stake their LOOT bag into the Polygon’s PoS chain via Polygon Bridge. Players will get pLoot or pmLoot which are mapped token in the polygon network. Moreover, once the mapping transfer of tokens is completed, all of the tokens are done ‘approve()’ calling with the battle contract. Therefore, players could get started to interact with the battle contract immediately, instead of approving the battle contract in advance (part of the code as follows).

Battle

Adventurers now can participate in the battle by calling the contracts ‘registerRole()’ function to save rarity data for the following battle game. We utilize the public data from dhot-loot to guarantee game fairness and ERC712 to sign register messages.

After register, players could start to play by randomly match another adventurer to have a 1 vs 1 PvP battle game (Because OG Loot and mLoot have different value, we now open 2 battlefields(via two contracts) for different Loot. So mLoot player will only battle with mLoot player, and so as the OG Loot player).

for mloot player, we have two way to battle, one is based on the rarity ranking, and the other is based on rarity score.

To determine which player will win, we use the Anish’s rarity score to decide which OG Loot has a higher rarity score from the 8 components, while in the meantime we add some random mechanism for low rarity players has a chance to win over high rarity player.

We will reward the player who wins the battle using our battle game token bAGLD, every adventurer can battle 20 times in a day to win the rewards

Challenges we ran into

Building a text based game with a lot of fun is the biggest challenges, this beta version we only put a very simple mechanism for users to play, and hopefully we will add more features into the game to create a better gaming experience.

Accomplishments that we're proud of

at the first day, we decide to choose a sidechain to make the better gaming experience and very cheap gas for the player. so the cross chain of nft is the 1st accomplishment we did . and the other accomplishment, i think is creating a battle arena for loot owners that can actually make adventure. although the gaming experience is quite simple at this time, we will add more battle feature in the next version

What we learned

creating the game really needs a lot of design and hard work. we learned how to design the battle, how to make a text game, how to use the loot existing projects to create more interesting game

What's next for Battle Loot

Since it is the demo version, and we would like all the community members who are interested in this game participate this project and build it to be the battle lego piece of Loot. We are planing to make V2 version, which has 1) airdrop to the OG Loot adventurer, 2) mirror loot level up, 3) stake farming and liquidity farming, 4) attributes and skills for PvP battle

Built With

Share this project:

Updates