What Is On-Chain Gaming?
On-chain gaming refers to video games that are exclusively built using blockchain, smart contract, and oracle technology.
Blockchain games are emerging as a new, superior way for games to attract and engage players, with gaming titans such as Square Enix, Nexon, and Ubisoft experimenting with this cutting-edge technology.
However, blockchains are not a be-all-and-end-all solution for most games: For example, most first-person shooter (FPS) games today cannot be run on blockchains. Blockchains are too slow to support their gameplay, and it’s unrealistic to use the technology for registering sub-second player reaction times. That’s why most blockchain games are, in actuality, games that use blockchains for very specific aspects of their technology stack—most notably the distribution and movement of digital assets that represent in-game items and currencies.
However, there is a niche but growing community of Web3-native developers and players that is pioneering games and gaming experiences built entirely on blockchains. In other words, fully on-chain games.
<div class="educational-divider sections-divider"></div>
What Are On-Chain Games?
On-chain gaming refers to the growing ecosystem of games and NFT primitives that operate completely on blockchains. Effectively, this means that every aspect of the game other than the frontend (the part of the game the player sees on their screen) is run solely using blockchain technology.
The main difference between an on-chain game and a traditional blockchain game is the implementation of game logic directly into smart contracts and the storage of game state (such as a player’s name, rank, etc.) on the blockchain, rather than a centralized gaming server connecting with only an NFT smart contract. A game, or game-like experience, can only be considered an on-chain game if all its game logic and data are stored on-chain.
<div class="educational-divider sections-divider"></div>
How Does On-Chain Gaming Work?
On-chain gaming requires that games solely use smart contracts (autonomous pieces of code executed by blockchains) to store their game logic and data.
Broadly speaking, game logic dictates the rules of a game: If it’s an online trading card game (TCG), the game logic dictates how matches begin, which cards can be played in which order, when a match ends, and more. It is the core of the game, and in an on-chain game, these aspects are written into stone using smart contracts.
Smart contracts are also used for creating, distributing, and moving digital assets. In the trading card game (TCG) mentioned in the above paragraph, the digital assets in use would be trading card NFTs. Digital assets are the most widely used technology in blockchain games, and they’ve already been implemented by NFT games such as Gods Unchained, Axie Infinity, Illuvium, WildCard, and Deadrop.
<div class="educational-divider sections-divider"></div>
Challenges of On-Chain Gaming
There’s a reason why most games aren’t on-chain games: On-chain gaming is rife with challenges that force developers and players to operate under strict technical limitations and navigate burdensome user experiences.
Blockchain Speed and Scalability
Because blockchains are like shared global computers that are operated by thousands of people around the globe, they lack speed and scalability, two critical technical elements to building a fast-paced game.
These technical limitations are why on-chain gaming today is largely limited to turn-based games such as TCGs or strategy games—smart contracts aren’t fast enough to handle the game logic for fast-paced games such as MOBA, FPS, or even RTS games.
Transparent Player Actions
Smart contracts and the transactions that run through them are transparently available for anyone to see. While this can be welcome in the case of financial transparency, it limits what’s possible for game design because there’s no privacy.
For example, game mechanics such as fog of war in a MOBA or RTS game are almost impossible to implement because these games rely on players having incomplete information. There are technical solutions to this issue that have been implemented in one-off instances, but this problem has yet to be solved for on-chain games at scale.
Botting
The design of on-chain games and smart contracts means that bots are capable of playing alongside players—and there’s no central entity to mandate anti-cheating software. This can diminish the player experience for certain games, especially because the botting incentive is relatively high when NFTs and other rare digital assets are offered as prizes in games.
Technical Limitations
Blockchains and smart contracts are inherently incapable of performing certain tasks given their stringent, security-minded design principles.
Two important limitations for on-chain gaming applications are accessing tamper-proof randomness and automating game logic when appropriate.
- On-chain randomness solutions, which almost all on-chain games have to use, are often manipulatable by the validators (or miners) on a network, as they can see the result of the randomness before it’s confirmed on-chain.
- Intermediary game actions, such as the propagation of a series of game logic based on a player’s actions, require automated smart contract function calls to reduce tedious gameplay, but this is not natively offered by blockchains or smart contracts. For example, if a player harvests a resource, automation may be required to collect the resource before it appears in their inventory.
This is where a blockchain oracle network like Chainlink can play a pivotal role in expanding what’s possible with on-chain games: Chainlink provides secure, on-chain access to these necessary game features.
<div class="educational-divider sections-divider"></div>
Benefits of On-Chain Gaming
Despite the many challenges to creating fully on-chain games, the on-chain gaming ecosystem offers a myriad of benefits that align closely with the benefits of blockchains and smart contracts.
Composable, Open-Source Primitives
Because the on-chain gaming ecosystem puts games completely on-chain, players and developers have the full ability to reuse game logic to create new types of games, build interfaces for the game itself so that it can manifest visually in a variety of ways, and create applications on top of the game to make the gameplay easier, more accessible, or more entertaining.
For this reason, on-chain games can be viewed as game primitives. Much like the fantasy tabletop role-playing game Dungeons & Dragons (DnD), on-chain games provide players with a certain set of rules that don’t change, and players can build on top of them accordingly (theoretically) forever.
Decentralization, Digital Permanence, and Immutability
An often overlooked aspect of fully on-chain games is their ability to function largely by themselves once they’re placed on-chain.
Given the resilient nature of blockchains (they can stay online for as long as there are validators), on-chain games have a digital permanence: They can exist as code for as long as the blockchain is running. Theoretically, if the underlying blockchain the game is built on were to exist 300 years from now, the on-chain game and game logic would still exist and be stored on the blockchain, and players could still play the game.
Low-Risk Technical Innovation
The process of applying and testing research in production can be a daunting task given the adversarial nature of blockchain environments and the value that they secure. This is particularly true for decentralized finance (DeFi).
On-chain games provide researchers and developers with a low-risk way to test the in-production implementation of cutting-edge technologies such as zero-knowledge proofs and homomorphic encryption. This is because on-chain games run on the same infrastructure as more “risky” applications.
Aesthetic Diversity
Blockchains and smart contracts are fundamentally backend technologies: If a player were to play an on-chain game in its purest form, they would have to interact with it using code commands.
This gives tech-savvy players and developers the ability to represent the on-chain game logic and data in any way they wish—they just have to connect a frontend (the aesthetic/graphic portion of the game that players largely interact with today) with the smart contracts that represent the game. Thus, it’s possible for a single on-chain game to have multiple user interfaces. Two players could be playing the exact same game, but one player might be playing in a medieval setting, and the other in a space-themed setting.
<div class="educational-divider sections-divider"></div>
On-Chain Gaming Examples
The roots of on-chain gaming lie back in 2013, and the area has continuously advanced since then.
HunterCoin
Launched in 2013, HunterCoin is widely considered to be the first on-chain game. It was built as an experiment to demonstrate the potential for decentralized game building. The game itself was run on its own blockchain, and players queued transactions that doubled as orders for player actions such as moving, gathering, or attacking another hunter.
Dark Forest
A more recent example of an on-chain game is Dark Forest, an RTS game set in space. Inspired by Cixin Liu’s popular sci-fi book The Dark Forest, players are placed on an unknown planet in space and are tasked with gathering resources and expanding their territory to incorporate new planets.
Dark Forest was one of the first implementations of a fully on-chain incomplete-information game: The team behind it built the game as a research experiment in zero-knowledge technology, which prevented players from being able to see where each other were on the map.
<div class="educational-divider sections-divider"></div>
The Advent of Web3-Native Games
On-chain gaming is relatively niche even within the Web3 ecosystem, but there are passionate community members, researchers, and developers who are pushing the boundaries of what’s possible in gaming when one uses only blockchain technology.