At a previous hackathon, we worked on a project similar to this one.

That project didn't win, but we believe the idea behind this project has potential.

We decided to create this new project, starting from the idea of the previous one but completely changing the architecture, the tools used, and the approach to solving the problem.
This project is much more powerful than the previous one and allows the user a greater degree of customization.

Very little has been used from the previous project. The only things in common are:

  • Know-How
  • A couple of lines of code
  • A few slides and lines of description

💡 Inspiration

  1. Gartner Hype Cycle research shows that NFTs will need another 5 years to reach the productivity plateau. Gartner says that at this stage, there is a need to build more user-friendly and cost-effective tools to help reach the plateau.

  2. At the moment, NFTs are ideal for determining the ownership of digital assets. The major digital assets are currently of three types: music, video games, and cinema.

    • The video game industry's revenue in 2021 was more than $180 billion.
    • The music industry's revenue in 2021 was about $26 billion.
    • The film industry's revenue in 2021 was about $100 billion.

The video game industry alone is bigger than the other two industries combined.
Currently, according to valuecoders.com, 48% of video games are produced using the Unity 3D engine. 

Creating an add-on for Unity3D that simplifies the integration of the blockchain into video games would mean accessing a potential market of about 90 billion.

✨ What it does

The add-on facilitates integration with the various video game blockchains.
Several features helps games developers to take advantage of the Chainlink functionalities.

At the moment, the main features are:

  • Build, compile, and deploy ERC1155 tokens without writing a single line of code.
  • Integration of VRFs for random probability to mint a token
  • The possibility of customizing the attributes related to the token
  • Store token images and metadata on IPFS
  • Integration with different blockchains (including Aurora Testnet, Polygon Testnet, Avalanche Testnet, Rinkeby)
  • Simple integration of in-game wallets
  • Tool to simplify the in-game use of the smart contract created

NOT COMPLETED YET:

  • Random assignations of value to attributes
  • Price Feed Read
  • Register Keeper Upkeep

🔨 How we built it

The application consists of two parts: an interface and a backend part.

UW3D Architecture

The interface has two main features:

  1. Creation of the smart contract.
  2. Interaction with the smart contract.
  • Is written in C# and is available at the following URL.
    • It is written following the KISS principles.
    • In the front end, we use the Unity SDK to save the images and metadata on IPFS.
    • Then, the data entered in the interface and the pointers IPFS Url are sent to the backend, where they are used to create the smart contract.
    • The interaction with the smart contracts is implemented in C #, using the Nethereum library.
    • The ABI generated by the backend is stored online.
    • The front end can download the generated ABI and use it to allow our classes to communicate with the chosen blockchain.

  • The backend part is more complex and is available at hte following URL.
    • It's built with DevOps methodologies.
    • The frontend data are sent to a WebHook of a Jenkins Pipeline.
    • The pipeline creates a new instance of Docker on which our project is launched.
    • A Node.js script will be called on this Docker instance, which has the task of inserting the data passed from the frontend into the boilerplate of a smart contract.
    • By doing so, a new custom contract is created.
    • Subsequently, HARDHAT will be used to compile and deploy the contract, again from the same pipeline, on the blockchain chosen in the interface.
    • Once the generation phase is completed, it will be possible to download the ABI produced from the frontend to allow the game to interface with the blockchain. We know that a direct integration between the front and Jenkins is not the ideal. Unfortunately, we had little time available during this hackathon. In the implementations before going into production, we intend to insert a backend layer written by us between the frontend and Jenkins to handle incoming traffic correctly.

🔥 Challenges we ran into

We had two problems in particular.

  • The first was related to the integration of IPFS with Unity3D.
    Using IPFS through Curl was very simple, but when we tried to use the same calls with the Unity3D SDK, we had several problems related to the Unity SDK.
    In general, the problem was due to the Unity SDK not behaving as expected when we went to pass some headers in post calls.
  • The second problem was related to the backend phase.
    It was related to the creation and generation of the contract.
    We had no idea about what was the best way to use the compiler in our solution.
    The final solution is the result of a process composed of many iterations and various tests.
    The original version provided for the integration of the compiler directly into the client version then discarded in favor of this final.

💯 Accomplishments that we're proud of

The most difficult part of the project was the realization of the backend part. Understanding which solution is the best for generating, compiling, and deploying contracts was not easy. To do this, it was necessary to carry out various tests and implementation tests. Considering that our DevOps knowledge was close to zero, we are very proud of the result achieved. We hope we have succeeded. Furthermore, the used approach will allow us to scale the application when needed.

📖 What we learned

In this hackathon, we have learned a lot of things.

  • It was the first time we used the products made by Chainlink
  • It was the first time we used IPFS.
  • We knew the DevOps methodologies, but we had never used them intensively. We learned a lot about DevOps technologies during this hackathon.

🚀 What's next for Unity(Web)3D Toolbelt

From here, the road is still very long. There is still a lot to do within this project, from a technical and non-technical level. These are the points on which we will have to work immediately:

  • Decides on how to generate revenue.
  • Cleaning the codebase from the hardcoded key (yes, we know, it's a horrible thing to do, but we had little time to work)
  • Develop a backend layer.
  • Implement the number of features and the degree of customization of smart contracts Add to the features Chainlink Cross-Chain Communication and Market Data Feeds.
Share this project:

Updates