Skip to main content

Ajuna Network Follow up

  • Team Name: Ajuna Network Team
  • Payment Address: 1. Milestone: 1FgaH4sRHF4boR4Fw316ddKMJbFpsDXGeL 2-4. Milestone: 3H2shhx3GyMjc5Y4QuF9D5skbQgZDhvPMq
  • Level: 2

image

Project Overview πŸ“„β€‹

We believe that the promising substrate blockchain technology enables us to bring a new way of gamification to a broad audience in a responsive, playful and immersive way. Our unique technical base allows us and the community to create independent games that can be deployed as enrichment to any substrate based chain.

Overview​

Introduction (A brief description of the project.)​

This is a follow up grant, on https://github.com/w3f/Open-Grants-Program/pull/265, of which all milestone have been submitted.

This followup grant is intended to create real value in the provided API, GameEngine, Service Layer and Unity Asset to help ramping up teams focusing on game develoment with substrate based chains, we are currently in development towards our early game access target in july for the DOTMog Mobile Game, which is our flagship game. The game has been described in our first open-grant application, as it is not part of the grant itself, we have removed the full description of it.

DEMO (from May 2021)

What matters for the grant are the artifacts that can be reused and extracted out of our game framework. The intention is to build a full featuring SDK for Unity and Substrate, which will be provided as a free Asset in the Unity Asset Store LINK and usable out-of-the box with the node-template pallet.

This is part of the components that Jeton Network is providing and maintaining for future blockchain game developers. Jeton Network intends to work towards a second order relay chain for games that like the benefit of using there own blockchain, but can't afford a parachain or parathread slot on Polkadot or Kusama.

image

Bot based testing with the SubstrateNetApi and GameEngine image

Fast On-Chain Storage Access image

Service Layer (PoC) image

Project Details​

This is the follow up grant from our previous open grant on Wave 9.

Mockups/designs of any UI components​

This is our current Dev GUI, from our running alpha release, we will extract it to a template involving the non DOTMog specific artifacts, like Blockchain Info, Wallet Info and updated and add simple configuration options.

image

API specifications of the core functionality​

https://github.com/dotmog/SubstrateNetApi

An overview of the technology stack to be used​

image

Documentation of core components, protocols, architecture etc. to be deployed​

Generic Game Pallets
Generic Game Pallets, build special features used in games, they are fully supported in the UnitySDk
Match Maker Pallet, Game Event Pallet and ConnectFour Pallet using them both. More to come, ...

UnitySDK for Substrate

  • Supporting features GameWallet (Wallet Creation, Restore, Mnemonic, Send)
    People can easily sign in to your game, by creating a wallet. Password encryption to login and a mnemonic to transfer or restore a lost passwort or mobile device.
  • Supporting features Matchmaker (Queueing, Rankingsystem, Invites)
    People can join Matches against other players in a ranked or unranked system, they are also able to create a match by invitation. The multiplayer setup enables turn based games with or with out time limitations an easy entry.
  • Supporting features GameEvent (Events that happen on specified blocknumbers, like an egg hatching, turn time passed or auction period finished)
    Easy access to Game Events for animation or updates that are triggered by storage updates. React on any on-chain events and create an interactive experience on mobiles.
  • Supporting features Asset (Create, Delete, Transfer, Buy/Sell, Auction)
    Asset handling allowing to create, delete, transfer and auction them. Having full availability of the pallet asset in the UnitySDK enables devlopers create in game shops and auction houses.
  • Supporting feature for custom gamelogic
    Custom logic can be easy implemented or at least it is well documented how the workflow works to get custom pallet functions into the UnitySDK.

The SDK includes a premade GameEngine, that supports the above features out of the box, additionaly, instead of connecting straight to the node over the substrateNetApi, it is possible to scale over a deployable ServiceLayer that offers a RestAPI to decouple client storage accesss to full nodes.

SubstrateNetService The service Layer project can be deployed to a server as DOTNet application offering node storage information as RestAPI to the UnitySDK GameEngine. The Service Layer can add a persistent layer to store node storage, with a Database which is already supported and documented.

PoC/MVP or other relevant prior work or research on the topic​

Our alpha game is already running, check out our webpage (https://dotmog.com/).

The basic part of the open-grant has been developed as framework for our flagship game, as we where focusing on the game it self the API lakes inline comments and might be a little complicated to jump in with out a good documentation or tutorials.

A lot of our previous work on the World of Mogwais is being used as PoC for the current project, the game logic we created WoMNetCore is reused where it makes sense or refactored to match better, here an old PoC. We used the CryptoKitties on Substrate as our first crash course into Rust and luckily it had a theme in common with our vision from 2017 old whitepaper.

Ecosystem Fit​

I think currently there are no such projects in the substrate ecosystem, at least we don't know of any. The setup should enable an easy start in to game development with substrate.

Team πŸ‘₯​

Team members​

Artists:

Contact​

  • Registered Address: Stetten SH, Switzerland
  • Registered Legal Entity: BloGa Tech AG

Team's experience​

The team consists of three experienced developers, one project manager / designer and additionally two supplying artists working on illustrations and 3D models. In past projects the team has already worked together on different projects one of them is mogwaicoin which has been live since 2018 and on the game on top The World of Mogwais. Besides that both devs have a background in reverse engineering of games and creating automations or simulators, like sabberstone. Our project manager is working in the financial sector in the same role for years as he is supporting the team. Based on the work of darkfriend77 Sabberstone simulator a lot of research and publications have been done in the AI domain (google: sabberstone research ai) or even ai competitions. Our passion is about creating games and/or enhancing the gaming experience for us.

Team Code Repos​

Other projects lead and maintained by the teammembers

Adding a polkadot related commit here .. https://github.com/usetech-llc/polkadot_api_dotnet/pull/10

Active organisations of the teammebers

Team LinkedIn Profiles​

Development Roadmap πŸ”©β€‹

Overview​

  • Total Estimated Duration: 4 months
  • Full-time equivalent (FTE): 1-2 FTE
  • Total Costs: 25.000 USD

Milestone 1: SubstrateNetApi β€” Rework and Documentation of the Substrate .NET API​

  • Estimated Duration: 1 month
  • FTE: 1-2
  • Costs: 5.000 USD

SubstrateNetApi is the base API and it needs a dedicated documentation to allow better adoption and also simplify custom needs, like integration to other blockchain types and more examples and inline documentation.

NumberDeliverableSpecification
0a.LicenseApache 2.0 / MIT / Unlicense
0b.DocumentationWe will provide both inline documentation of the code and a basic tutorial that explains how a user can (for example) spin up one of our Substrate nodes. Once the node is up, it will be possible to send test transactions that will show how the new functionality works.
0c.Testing GuideThe code will have unit-test coverage (min. 70%) to ensure functionality and robustness. In the guide we will describe how to run these tests
0d.Article/TutorialWe will write an article or tutorial that explains the work done as part of the grant.
1.Enhance APIGeneric handling of Types & Metadata, Custom Pallet & Type support
1a.Enhance APIExtend Generic Types for Vec & Option
1b.Enhance APIImplement Extension Custom Pallets & Types for PolkaDot, Kusama, DOTMog & UniqueNetwork
1c.Enhance APIGeneric Approach on Encode & Decode of Types
1d.Enhance APIImplement Rust special enums, who are used like structs
2.SchnorrkelReintegrate Schnorrkel, into SubstrateNetApi
2a.SchnorrkelPublish Schnorrkel project, with proper licensing as nuget package
2b.SchnorrkelImplement SR25519, similar to ED25519 in SubstrateNetApi
3.MnemonicAdd mnemonic seed, in SubstrateNetApi
3a.MnemonicAdd mnemonic seed, recovery on lost password or wallet file
6.DocumentationDocumentation referencing prev. milestone 1 https://github.com/w3f/Grant-Milestone-Delivery/pull/102#issuecomment-795929390
6a.Inline DocumentationAdd inline documentation to make code more understandable
6b.WikiAdd a structured wiki, include components and workflows, ex. updateing blockchain metadata, implementing custom pallets, implementing custom types ....
6c.TypesWiki documentation on workflow for adding types and maintaining the api
6d.NodeAdd documentation how to setup live node-template testing, for extrinsic
6e.Custom TestAdd documentation for custom pallet and type testing
7.Ajuna NetworkInternet appearance of the Ajuna Network, under www.ajuna.io
7a.Ajuna NetworkArticle and Blog about this open grant and the deliverables, at least one deep dive post into each milestone subject area, SubstrateNetApi, GameEngine, ServiceLayer & ConnectFour (if accpeted)

Milestone 2: GameEngine β€” Implement Basic GameEngine Domain Driven Design (DDD) & Implement Basic Bot's for Load and Game Testing​

  • Estimated Duration: 1 month (est. February 2022)
  • FTE: 1-2
  • Costs: 7.500 USD

Game Engine is the logic layer for games and provides the necessary informations for the presentation layer that is in unity. To avoid having storage accessed by players all the time, we provide a service layer that keeps global storage changes uptodate an creates event handling which can be subscribed by the representation layer for updates or animations.

NumberDeliverableSpecification
0a.LicenseApache 2.0 / MIT / Unlicense
0b.DocumentationWe will provide both inline documentation of the code and a basic tutorial that explains how a user can (for example) spin up one of our Substrate nodes. Once the node is up, it will be possible to send test transactions that will show how the new functionality works.
0c.Testing GuideThe code will have unit-test coverage (min. 70%) to ensure functionality and robustness. In the guide we will describe how to run these tests
0d.Article/TutorialWe will write an article or tutorial that explains the work done as part of the grant.
1.PalletGameEventSystem(events on blocknumber based not on extrinsic), Matchmaker(Queue up, Ranked and non ranked, create matches)
2.Game Engine
2a.Game EngineConcept game engine and architecture (Domain Driven Design) and Implement basic and generic game Entities
2b.Game EngineAccount, Player, Wallet (Private Key Encryption / Mnemonic Restore
2c.Game EngineAsset Transfer, Buy/Sell, Auction
2d.Game EngineGameEventSystem (events on blocknumber based not on extrinsic), Matchmaker (Queue up, Ranked and non ranked)
2e.Game EngineEvent System, for game changes for games in Unity you need trigger points for animations and datachanges, this need to be decoupled, so you have an easy access to them in Unity.
2f.Game EngineCustom Game Logic layer
3.Service Layer
3a.Service LayerConcept service layer (Domain Driven Design)
3b.Service LayerImplement service layer global storage access over SubstrateNetApi
3c.Service LayerImplement service layer for all mentioned Entities (Account, Player, Wallet, etc.), register changes and creation of entities
3c.Service LayerImplement service layer extension to use a light weight database as a persistence layer
3d.Service LayerCreate event system for storage changes, this is needed for example to trigger presentation layer updates or animations, like egg hatching animation when gameevent triggers
4.Rest APIAdding service Layer Rest API, accessing Game data
5.Basic BotImplement Basic Bot, that plays Connect Four with an human like strategic
6.TutorialService layer, Docker setup, Rest API & Multithreaded Bot testing of Game and Performance
7.GeneratorSince substrate monthly-2021-10, types are fully disclosed in the metadata, which allows to generated more or less everything for the service layer
7a.MetaDataDecode Node exposed Metadata into a json format readable and interpretable for the generator, json file of the node exposed metadata
7b.GeneratorAjuna.NetApiExt Generator, including all Types
7c.GeneratorStorage Generator, including all Pallets
7d.GeneratorRest Generator, including all Pallets

Milestone 3: Unity β€” Substrate SDK for Unity, Documentation, Templates and Tutorial Video​

  • Estimated Duration: 1 month (est. March 2022)
  • FTE: 1-2
  • Costs: 7.500 USD

Creating a Free Unity Asset in the Assetstore, will allow access to Substrate for game devs, it will take some iterations to provide an out-of-the-box solution and the fast paced susbtrate develoment might create additional maintanance work during the on going project. The goal is to provide an end to end working Asset that uses the node-template and allows access to alice and bob account and balances in a mobile deployable project on unity.

NumberDeliverableSpecification
0a.LicenseApache 2.0 / MIT / Unlicense
0b.DocumentationWe will provide both inline documentation of the code and a basic tutorial that explains how a user can (for example) spin up one of our Substrate nodes. Once the node is up, it will be possible to send test transactions that will show how the new functionality works.
0c.Testing GuideThe code will have unit-test coverage (min. 70%) to ensure functionality and robustness. In the guide we will describe how to run these tests
0d.Article/TutorialWe will write an article or tutorial that explains the work done as part of the grant.
1.UnityFree Substrate SDK for Unity in the Asset store
1a.UnityTemplate Wallet, integrated over the ServiceLayer and the GameEngine, including functionalities (Creating Wallet (Private Key Ed or Sr), using a Mnemonic seed), Restoring Wallet, Transfering Coins, Balance Update, Error handling)
1b.UnityTemplate with On chain GameEvent and Pallet Matchmaker, where User can queue up to a match and animations that are executed on on chain game events
1c.UnityTemplate example for Event handlin, balance changed, sending extrinsic in Unity
2.UnityTutorial for building and connecting with Unity including connection, wallet decription and balance in Unity
3.AssetAsset Documentation like (https://assetstore.unity.com/packages/tools/utilities/blockchain-sdk-by-enjin-124133)
3a.AssetTutorial video on implementing a new chain and accessing it with unity
3b.AssetTutorial video on adding a custom pallet and accessing it in unity
3c.AssetIntegration Guide of adding a new function in a pallet, adding it as custom pallet function to SubstrateNetApi, adding custom storage access to Service Layer, and adding access in game engine to the new function for unity

Milestone 4: Complete Game "Connect four", as Tutorial from scratch on Substrate and Unity playable on Mobile (Player vs. Player)​

  • Estimated Duration: 1 month (est. March 2022)
  • FTE: 1-2
  • Costs: 5.000 USD
NumberDeliverableSpecification
0a.LicenseApache 2.0 / MIT / Unlicense
0b.DocumentationWe will provide both inline documentation of the code and a basic tutorial that explains how a user can (for example) spin up one of our Substrate nodes. Once the node is up, it will be possible to send test transactions that will show how the new functionality works.
0c.Testing GuideThe code will have unit-test coverage (min. 70%) to ensure functionality and robustness. In the guide we will describe how to run these tests
0d.Article/TutorialWe will write an article or tutorial that explains the work done as part of the grant.
1.Pallet & UnityPallet: Connect four, Matchmaker, Multiplayer, TimeBased Turns
2.UnityProvide fully functional Multiplayer playable "Connect Four" for Mobile (Android), playable with bots and as real player
3.UnitySDKProviding a performance test setup that creates 1000 bots playing the game concurrently
4.UnityYoutube Videos serie Step-by-Step Connect four on Substrate Mobile

Future Plans​

We are working towards the goal of creating a modular gaming blockchain with reusable components that game devs can use and enhance.