A Unity3D frontend for a fully on-chain game. Using Unity, we've created a 3D frontend, running in browser, for Emojimon, the existing 2D on-chain game provide as the example game for the MUD framework.
MUD is an existing, open source, on-chain game framework made by Lattice. An on-chain game means all logic and state is controlled by smart contracts. It is being used by multiple on-chain game projects.
https://github.com/latticexyz/mud
Emjoimon is the example project provided by Lattice to demonstrate how to use the framework and help onboard new projects. The game represents the player as an emoji moving around am emoji based map and encountering monsters for Pokemon style battles. It supports multiple players in the same word.
https://mud.dev/tutorials/emojimon/
This project is about taking the existing React 2D browser game and giving it a fully 3D rendered browser frontend by integrating MUD with Unity for the first time. The game logic already existed as an open source MUD2 example rended purely in React so the feature being demonstrated as part of the hackathon is the integration of Unity3D which is rarely seen in block chain projects.
MUD is frontend agnostic framework for building composable on-chain games and provides libraries for frontends built in React and, to a lesser extent, Phaser. There is no provided Unity interface.
The lack of a MUD-Unity interface is a barrier to MUD, and on-chain games more generally, being adopted by many potential game development projects.
This project demonstrates that its possible to create a Unity frontend for a MUD based game project.
The underpinning blockchain framework is MUD2, an EVM compatible framework designed for making fully on-chain games where all logic and state are held on the block chain. The presentation layer for this project is Unity3D targeting WebGL. The hackathon centred around integrating Unity3D with MUD2. We are loading the Unity3D layer via a React wrapper and incorporated glue code to facilitate the communication between Unity3D and MUD.
The two project team members are part of the Playmint team building a fully on-chain, open-source, game. Code named, DawnSeekers, it has a mixed Unity and React frontend built on a custom on-chain game framework called COG.
https://github.com/playmint/ds https://github.com/playmint/cog
Lessons learned from Playmint made it possible to execute this project in two person days but no part of DawnSeekers code was directly used.
The game is deployed to a Foundry, Anvil chain and has been tested running on a local instance. With not much further work to et up the deploy config it could be deployed to any EVM chain.