CryptoFights and Sidechains, Oh My!

Crypto Fights
CryptoFights
Published in
4 min readAug 25, 2018

Continuing on what I wrote in a previous article about the user experience in interacting with your dapp, I thought I would start to discuss why using sidechains are a great idea for CryptoFights.

This type of game has a very heavy pen and paper role playing game influence. For example, our battles around rolling dice with modifiers. A modifier is a value we add to a dice roll, we then use the result in the fight. So a fight would go like this:

Who gets to attack first? We need both players to roll a dice to figure this out. This is called the initiative roll. We roll a 20 sided dice and the highest number wins. What if you picked an elf for your fighter? Elves get a bonus their initiative; that way you would get a +10 modifier to your roll, a massive bonus to going first. Additionally, your fighter’s initiative also depends on how high agility is, so if you want to leverage your elven racial you may want to add more points to agility, many options here like an elf assassin (high agility + dual wielding daggers).

  1. Now we need to roll dice to figure out if you hit your opponent. You roll another dice called the attack roll. This roll can have modifiers also, particularly from the weapons you equip. So lets say your attack hits.
  2. After determining who goes first, we need to roll dice to figure out if you hit your opponent. You roll another dice called the attack roll. This roll can also have a modifier depending on the type of weapon you equip. So let’s say your attack hits.
  3. Now you need to roll another dice to see how much damage you inflict. If you’re using an Assault weapon, your strength gets factored into the modifier; if you’re using a Precision weapon, then your agility is used instead. Other weapon properties may further affect how the hit is processed, and your opponent could have defenses that counter the damage type of your weapon.

The example above is just a tiny part of the game’s logic that we have laid out on our smart contracts. The entire CryptoFights game logic defines how matches are fought and won based on how you configure your fighter for a fight. CryptoFights is a deep thinking strategy RPG fighting game. You have to outsmart your opponent with gear, luck, and strategy.

Our 2nd fighting arena — Marketplace

Plus we will have real-time actions that you can take to affect the battle. We will have an improved attack that adds more damage, a healing action, and a defensive stance to counter some damage for one turn. You can activate any of these actions on any turn to affect what your opponent might do next. Make sure you use them at the right time since they have a cooldown before you can use them again.

So with giving you just a taste of some of the games logic that we had to code we quickly found out that we need a high performance blockchain to handle all of these decisions while not asking for the players to pay for each transaction or gas costs.

Think of the sidechain we will be running as an EOS on top of Ethereum…

Running each DApp on its own sidechain to Ethereum has a number of benefits, but most importantly:

  1. DAppChains can use alternative consensus rulesets (like DPoS) that optimize for high scalability.
  2. Using Ethereum as a base-layer means DAppChain-based assets (like ERC20 and ERC721 tokens or better yet ERC1155) can have the security guarantees of Ethereum, especially when backed by Plasma.

Secured by Plasma on Ethereum

DAppChains use Plasma-based relays to transfer assets back and forth from Ethereum, which allows ERC20 and ERC721 tokens to be used on the DAppChain while still being secured by Ethereum.

This will allow players to experience a wonderful fighting game without having to handle transactions manually like with metamask. You can then move your items from the sidechain to the mainchain automatically.

So much more to write about but I will leave it here for now.

Stay tuned for more CryptoFights news. We have a lot of exciting tech we are working on to make this an awesome game.

--

--

Crypto Fights
CryptoFights

CryptoFights is a 1vs1 PVP turn-based fighting game that enables players to heavily invest in their custom-made character and enter cash tournaments.