paint-brush
How MEM Lifts the Adoption Barrier for On-Chain Gamingby@decentland
238 reads

How MEM Lifts the Adoption Barrier for On-Chain Gaming

by Decent Land LabsNovember 20th, 2023
Read on Terminal Reader
Read this story w/o Javascript

Too Long; Didn't Read

Major game publishers like Square Enix, Nexon, and Ubisoft are venturing into blockchain gaming, but onchain games face scalability and user experience challenges. The Molecular Execution Machine (MEM) emerges as a solution, offering a serverless, gasless environment for onchain games. Teaming up with the NEAR blockchain, MEM tackles scalability issues, reducing operational costs and enhancing gaming experiences. The example game, YoctoManji, demonstrates MEM's potential in creating scalable, serverless, and gasless onchain games with near-instant finality.
featured image - How MEM Lifts the Adoption Barrier for On-Chain Gaming
Decent Land Labs HackerNoon profile picture


Major game publishers like Square Enix, Nexon, and Ubisoft have entered the blockchain gaming space, signaling real utility for the tech industry in this brutal consumer market. But why haven’t we seen developers take the plunge? Why, despite validation from triple-A firms, does onchain gaming remain a niche?


The root of the issue: consensus is slow and expensive – two deal-breaking factors for consumer tech adoption. Realistically, leveraging blockchain for registering lightning-fast player reactions remains impractical, especially for real-time genres like FPS. Most blockchain games eventually pivot to utilize the technology selectively in the stack, primarily for managing the distribution and ownership of in-game items, skins, and currency.


In this article, we look at the limits faced by pure on-chain games and how MEM offers a solution. We also share an example implementation powered by MEM and the NEAR blockchain.

Distinguishing between on-chain and blockchain games

Onchain gaming operates exclusively on the blockchain, excluding the game's frontend. Here, the game logic is embedded within smart contracts, and both the game's state and data storage resides on the blockchain (onchain).


Conversely, blockchain games are essentially web2 games (centralized server-hosted games) that integrate specific blockchain technology, often for trading cards or tokenizing game assets as NFTs. In a blockchain game, the logic, data storage, and state are housed off-chain on centralized servers.

The advantages of on-chain gaming

While developing fully on-chain games poses several challenges, the on-chain gaming ecosystem presents numerous advantages that closely resonate with the benefits of blockchains and smart contracts.


Transparent & immutable actions: Actions and transactions recorded on the blockchain are transparent and immutable, building trust and preventing fraud.


Ownership of digital assets: Players truly own in-game assets as non-fungible tokens (NFTs) on the blockchain, allowing secure transfers and verifying their scarcity.


Decentralization: Reduces reliance on centralized servers, distributing control among players and fostering a more decentralized environment.


Monetization possibilities: Players can earn tokens within the game and sell them elsewhere, opening avenues for earning through gameplay, trading, and content creation.


Anti-cheating measures: The transparency of blockchains makes cheating more difficult, as actions are publicly recorded and immutable.


Composability: In the on-chain gaming realm, game logic can be reused to birth new game varieties, craft diverse visual interfaces, and develop applications for smoother, more accessible, and entertaining gameplay experiences.


Support for multiple clients: on-chain games typically require code-based interactions, so tech-savvy players and developers can link game logic represented in smart contracts to various frontends, enabling diverse aesthetic representations. This allows for multiple user interfaces within a single on-chain game, where two players could experience the same game differently (e.g., one in a medieval world and the other in a space-themed setting).


Navigating the challenges of EVM based on-chain gaming

Onchain games face strict technical limitations and burdensome user experiences, which serve as primary deterrents for both developers and players. Here are some challenges:


  1. Scalability: Blockchain networks often struggle with scalability, causing issues with transaction speed and volume, which can hinder the smooth operation of complex games and in return result in poor UX.


  2. User experience: The technical nature of interacting with on-chain games via wallets or code commands, or requiring the players to have a wide understanding of web3 can be off-putting for less tech-savvy players, impacting user adoption and retention.


  3. Cost and speed: Transaction fees and confirmation times on certain blockchains can be costly and relatively slow, affecting the affordability and real-time nature of gameplay.


  4. Data storage: Storing large amounts of game-related data on the blockchain can be expensive and impractical due to limitations in storage capacity and costs. And because of that, the game’s developers opt for cheaper data storage solutions that are off chain and centralized.


  5. Specialized programming languages: Solidity, the primary language for EVM smart contracts, requires gaming developers to learn a new skill set. Its unique syntax and structure can be challenging, especially for traditional game developers accustomed to different programming languages.


Leveraging MEM for on-chain gaming

MEM is a decentralized web3 serverless functions network based on the Verifiable Atomic Computing Paradigm – chain-agnostic, highly scalable, and with near-instant finality. It executes functions written in various programming languages within a sandboxed environment.


Revisiting the challenges faced in on-chain gaming, MEM emerges as a possible solution to lift the UX and computational limits of the EVM while maintaining transparency and interoperability. MEM facilitates the development of gasless, chain-agnostic, highly scalable games with millisecond latency.


Instead of embedding their game's core logic in an EVM smart contract and relying on EVM L1/L2 for data storage and storing the game state, game developers can opt for MEM. Using their preferred programming language (such as JavaScript or TypeScript), they can construct the same game, leveraging MEM's integration with the Arweave network to maintain a permanent state. This integration, facilitated by MEM, not only ensures enhanced scalability but also delivers a smoother Developer Experience (DX) and User Experience (UX) within the gaming landscape.


At the time of writing, MEM handles the expenses tied to storing serverless function states' data on Arweave. Consequently, within its ecosystem, MEM provides free permanent data storage for these functions.

Example: YoctoManji

YoctoManji is a fusion of classic board games like Monopoly with the spirit of Jumanji and the aesthetics of Minecraft. The twist: landing on special plots marked by black gems triggers unique rules the user must take. Whether it involves paying fees to the plot owner or engaging in transactions on decentralized applications, each gem-bound rule triggers new challenges to complete.


The game's contract orchestrates player movements, and turns, and verifies on-chain plot rules. Failure to comply with a plot's rule incurs a cryptocurrency penalty for the player. This gaming prototype showcases MEM's role in managing the core game logic, verifying plot actions, and handling data and state storage. Additionally, it leverages NEAR for financial features, including fee payments, entry fees, and executing plot-related rules on the NEAR blockchain.


Sample YoctoManji Gameboard


While this MVP presently relies on NEAR for its financial operations, the deterministic feature offered by MEM introduces versatility. This feature allows for the utilization of any network, be it Ethereum, Optimism, Arweave, or others, for financial processing.


The game’s serverless function backend can be found here: https://github.com/decentldotland/yman/tree/main/contract


And the game’s frontend here: https://github.com/decentldotland/yman/tree/main/src/pages

This board game operates in a completely serverless, on-chain, and gasless environment, ensuring near-instant finality while delivering a user experience reminiscent of Web2 applications.


In conclusion, on-chain and blockchain gaming represent an emerging sector with vast untapped potential and a significant market share. While blockchain technology offers unique benefits such as censorship-resistant finance, complete asset ownership, and inherent tamper-proof characteristics, these advantages come with trade-offs. Technical scalability limitations, technological constraints, suboptimal user experiences, and higher operational costs often deter users and developers from further investment in this domain.


The Molecular Execution Machine (MEM) presents a range of features poised to empower the infrastructure of Web3 gaming, whether on-chain or blockchain-based. MEM's serverless functions offer a means to reduce operational costs, enhance game scalability, and address several technical limitations prevalent in the EVM gaming sector.


Are you constantly hitting bottlenecks in your game development??

Join the community discord.gg/decentland and let us show you how MEM can save you development time and infrastructure costs!

decent.land