Skip to content

tash-2s/open-emoji-battler

 
 

Repository files navigation

Open Emoji Battler

Open Emoji Battler is a decentralized auto-battler game owned by the community. The game logic is implemented in Rust, compiled to Wasm, and runs on both the blockchain and a web frontend. The SPA frontend, which can be hosted on IPFS, only interacts with the blockchain, thereby eliminating the need for central servers. Our game provides players with fun and strategic battles where they can deploy their emoji units and challenge other players.

To learn more about this project or to refer to the player guide, please visit our guide site.

demo.mp4

Vision

We are building a decentralized, engaging multiplayer game. While most blockchain games are centralized and often prioritize monetary aspects over gameplay, we are taking a different approach with Open Emoji Battler. Here, the community is at the heart of the project. This project is open and is governed by the community to create a fun gaming experience.

Technology

The game mechanics are coded in Rust, built into Wasm, and used for both the blockchain and frontend. It avoids the need to implement the same logic multiple times and also makes a smoother user experience. The frontend advances the game with minimal interactions with the blockchain, and then the blockchain validates the player's actions from the frontend to prevent cheating.

We use the Polkadot ecosystem for the on-chain execution. The on-chain logic was initially implemented as a standalone chain using the Substrate framework. We later developed a smart contract version with the ink! eDSL, which is our current focus. Both implementations share the same codebase, but the chain implementation has a feeless transaction feature using per-transaction PoW and Web Workers. For more details, please refer to the chain's README.

The game system is designed with on-chain execution in mind. So, despite the game's apparent complexity, it only has two transaction interfaces: starting a game and ending a turn or a game.

The frontend is a SPA and uses the Web Animations API to show battles.

Development

Prerequisites:

  • Rust
  • Node.js

To set up your development environment, execute the following commands:

npm install
cp common/js/src/envs/local.example.json common/js/src/envs/local.json

Then, follow the instructions for the contract and the front.

About

👑 Indie on-chain game built on Substrate

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 56.7%
  • Rust 37.4%
  • Sass 3.0%
  • JavaScript 2.5%
  • Makefile 0.1%
  • HTML 0.1%
  • Other 0.2%