Let the Multi-Chain Games Begin

Let the Multi-Chain Games Begin

Authored by Kwame Bryan

Why multi-chain support is critical to unlocking the full potential of blockchain gaming

The recent rise of Axie Infinity showed the gaming industry just a fraction of what blockchain-based gaming can achieve. With the introduction of play-to-earn models and non-fungible tokens (NFTs), the opportunities for today's game developers are essentially limitless.

However, not every developer is crypto-native, nor do they have the time to keep up with a space moving at exponential speeds. So perhaps a good place to start is with a quick orientation on multi-chain development and why multi-chain support is essential to unlocking the full potential of blockchain gaming.

Blockchain agnosticism

What does it mean to be blockchain agnostic? Simple, it means being open to using different blockchains or tools that support a variety of chains. This is central to the mission at ChainSafe, and it shows in our work with Ethereum, Polkadot, Filecoin, Mina, Cosmos, as well as various flavors of the Ethereum Virtual Machine (EVM).

For our gaming SDK - an open-source library that connects games built with the Unity game development engine to the blockchain - we currently support Ethereum, Avalanche, BSC, Moonbeam, Polygon, and xDai. We're planning for numerous blockchain integrations in the future, but initially, we're starting with the most popular and diverse ecosystem, Ethereum and EVM-compatible chains.

Many of you may have some knowledge and background on the EVM and the flexibility it allows in forking (i.e., creating a copy) to make your version(s) of Ethereum. This is great, but it can be argued that forking Ethereum is a pain point in the industry, as the forked versions fragment the ecosystem.

Conversely, this has also boosted adoption on Ethereum and enabled decentralized finance on layer-two (L2) solutions - secondary frameworks or protocols built on top of an existing blockchain to address scaling issues. So, in this context, multi-chain means not only supporting new blockchain ecosystems but a diverse set of L2 solutions.

Gas pains and Ethereum scalability

Despite the rise of other popular chains like Solana, Ethereum is arguably still the center of the NFT and gaming universe. Yet, the elephant in the room for Ethereum is its scalability and high gas fees. The one downside to Ethereum's popularity is that the more we use it, the more expensive it is to transact as the network becomes congested.

However, these issues will be addressed with the planned release of Proof of Stake (PoS) Ethereum Consensus (aka Eth2). Outside of PoS, some of you may also be familiar with the relatively new EIP-1559 standard, which aims to - among other things - make gas prices cheaper. It's still not conclusive if EIP-1559 will normalize the gas fee issue, but there is evidence of it making accurate predictions for gas fees during periods of normal activity.

These are exciting changes, but it will likely take years to implement all the changes and the process carries inherent risks due to its experimental nature. In the interim, other permissionless blockchains like Polygon and xDai are already here, offering low fees and faster transaction finality.

Which chain should I choose?

Choosing between chains can be a tricky decision for the uninitiated. ChainSafe prides itself as multi-chain maximalists, and we want to support as many chains as possible. But ultimately, it's up to a developer and their users to decide where they want to go. In doing so, here are a few questions to consider.

  • Who is your target market? Who your ideal users are plays a big role in deciding where you choose to build. Consider how a community might align with your marketing needs, support needs, or philosophical preference. Factor in the size as well, because for some, building on a less popular chain means easier access to core dev support, grant funding, etc.

  • On what chains will your game assets be deployed? This is important to know because in-game NFTs might need to be deployed to multiple chains rather than just one. How much value do you put on decentralization? Many chains purport to be decentralized when in reality, control of the network is held by a handful of people.

With all that said, it really does come down to you, the developer, and your community in deciding the chain you wish to support first. It's always possible to redeploy and modify your contracts for the other chains at a later date, but where you start is important.

Write once, play anywhere?

So, we have tried to explain what the multi-chain paradigm is and the initial reason for creating a gaming SDK that supports many different blockchains. Which leads us to the next question - can we write our game(s) once and play anywhere?

No, not exactly. What happens is our frontend dApp communicates with the various backends, i.e. "smart contracts", but our contracts need to be launched and deployed to the different chains we are supporting. The one great thing in this scenario is that most chains are EVM-compatible. And since most chains are EVM-compatible, we can write our code in Solidity the primary programming language of the Ethereum blockchain.

Then, our users will play the game or use the dApp on the specified platform by selecting the appropriate wallet to pay funds from and transact with. Now, this is a highly contentious topic, but when considering building a game or dApp should you choose chain-specific or chain-agnostic?

We chose the latter, and that's how our gaming SDK works. You write one frontend, i.e. "Unity3D", and have multiple backends with deployed contracts on i.e. Polygon, BSC, Moonbeam, etc. The ChainSafe Gaming SDK acts as a middleware, which ties everything together.

In closing...

The multi-chain paradigm is one of the most talked-about topics in the blockchain space, and there's tons of energy being directed towards a world of co-chain consensus which allows different networks to communicate and agree despite not sharing an underlying consensus model.

In terms of takeaways, it's important to remember how it's possible for an L2 like Polygon to live on top of the underlying protocol (i.e. Ethereum) and add its own consensus models to alleviate high gas prices and slow transaction fees. This gives game developers and users significantly more options.

Get involved

Interested in blockchain gaming? There are many ways to get involved!

You can use this link to download the ChainSafe Gaming SDK and get set up with the development environment.

You can hop on over to our newly released documentation site, where there are video tutorials on building your first blockchain-connected Unity game, including for mobile. And if any questions come up, ChainSafe devs are super responsive on our Discord, just head over to the #gaming-general channel!

Want to work with ChainSafe? Join us!

Check out the open positions on the Careers section of our website and get in touch with us at careers@chainsafe.io if you're interested.

You can also learn more about ChainSafe by visiting our website, Medium, Twitter, or by visiting our GitHub. We also have a YouTube channel with great content!

Acknowledgments

Special thanks to Alessandro Voto, Tim Ho, and Colin Adams. Your contributions were invaluable in the creation of this article!