Skip to main content

Mobile Game Framework for Substrate

  • Proposer: enfipy
  • Payment Address: 1Gkvai1HtZmtQ5DWDGrCwarKHh4SErAufe

Project Description 📄​

We want to make it simple to create and build Android and iOS game projects and connect them with Substrate blockchain. Currently, setup build of rust game project with basic requirements (like 2D/3D rendering, sounds, touch events, textures, etc) for iOS and Android is a pretty hard task. So a lot of developers don't start projects on top of rust-lang game engines because of uncertainty that they will be able to publish them to Google Play and App Store. We want to change this situation and make sure that anybody will be able to create, build and publish their mobile games to the marketplaces. Make this process simple yet reliable.

Also, we are extremely excited about decentralized games and what kind of games can be created with this idea in mind! Substrate blockchain framework is ideal for this as it can provide forkless updates, smart contracts, light client and so much on. We plan to create a setup for mobile development first, build a Substrate light client in mobile app and connect it to Substrate full node (or make a connection via JSON-RPC). Make sure that we can subscribe to data and send extrinsics to any Substrate based network. So that anybody from community of Polkadot will able to create own game projects, build for mobile platforms and publish them.

There are already plenty of interesting game engines made with rust-lang (e.g. Piston, Amethyst, BevyEngine. But we don't want to make it possible to build only with one specific rust game engine so we will do this framework game engine agnostic as much as possible.

Pros for Polkadot Ecosystem:

  1. We will setup mobile development environment - community of Polkadot will be able to create own mobile game projects on top of it. This is also very useful for rust game development community.
  2. We will create integration and communication with substrate node and make sure that it runs on mobile platforms flawlessly.
  3. The community of Polkadot will be able to set up their own substrate-based game projects in a matter of minutes.
  4. The first decentralized mobile game on top of the Substrate.

After the finish of this project, our team wants to create a mobile strategy game with all backend logic in Substrate. So this project important step forward decentralized mobile game on top of the Substrate.

Team 👥​

Development Roadmap 🔩​

  • Total Estimated Duration: 12 weeks
  • Full-time equivalent (FTE): 2.0
  • Total Costs: 2.5 BTC

Milestone 1 - Create setup for Android (parallel milestone 3)​

  • Estimated Duration: 4 weeks
  • FTE: 2.0
  • Costs: 1.0 BTC
NumberDeliverableSpecification
1.Project on AndroidSetup basic project and Android Application build and run it on Android device and emulator.
2.Working app with Rust code insideLink rust code to Android application.
3.Basic app UI, working touch events and storage accessAdd touch events, storage access for game assets (textures, images, sounds, etc) and simple UI for Android Application.
4.Substrate inside Android appBuild Substrate light client (or JSON-RPC API client) for Android Application.
5.Connection to Substrate network from appAdd connection from rust code in app to the Substrate network.
6.Blockchain explorerAdd simple blockchain explorer to Application for showcase of working Substrate connection side.
7.CI and testsAdd Github CI for automatically build and test Android application.
8.DocumentationWrite documentation to create and build similar applications for Android.

Milestone 2 - Create setup for iOS (parallel milestone 3)​

  • Estimated Duration: 4 weeks
  • FTE: 2.0
  • Costs: 1.0 BTC
NumberDeliverableSpecification
1.Project on iOSSetup iOS Application build and run it on iOS Simulator.
2.Working app with Rust code insideLink rust code to iOS application. Make it work with Xcode-compatible iOS bitcode.
3.Basic app UI, working touch events and storage accessAdd touch events, storage access for game assets (textures, images, sounds, etc) and simple UI for iOS Application.
4.Substrate inside iOS appBuild Substrate light client (or JSON-RPC API client) for iOS Application.
5.Connection to Substrate network from appAdd connection from rust code in app to the Substrate network.
6.Blockchain explorerAdd simple blockchain explorer to Application for showcase of working Substrate connection side.
7.CI and testsAdd Github CI for automatically build and test iOS application.
8.DocumentationWrite documentation to create and build similar applications for iOS.

Milestone 3 - Create generic framework, documentation, tutorials and examples​

  • Estimated Duration: 4 weeks
  • FTE: 2.0
  • Costs: 0.5 BTC
NumberDeliverableSpecification
1.Simple interface of creation of Android and iOS projectsEncapsulate logic and pipeline of building for Android and iOS as much as possible.
2.Templates for Android and iOS projects to make it possible to create projects from it in one callCreate template Android and iOS platform projects to create new applications from them.
3.CLI and build utilitiesMake utilities to make it possible setup build in matter of minutes.
4.Support of CD with FastlaneAdd support of continuous delivery with Fastlane.
5.Test Substrate network with test dataRun Substrate testnet with pallets and data that can be used in Applications.
6.Documentation, tutorials and example projectCreate detailed documentation, tutorials and example projects (with connection to substrate node) for the project.

Future Plans​

  • We want to create a mobile game in a military-economic strategy genre with Substrate blockchain. Then publish our game to Google Play and App Store. Continue to develop and polish it.
  • Integrate non-fungible tokens (NFT) in our game world in the form of game items. Also, add ability to create and deploy smart contracts by players to enhance their base or automate things. Run mainnet and connect to Polkadot as a parachain.