Please describe your proposed solution.
Problem
Integration of Cardano blockchain technology into traditional video game products is a lucrative market that, we believe, has the potential to deliver concrete benefits to all parties involved. Users of video game products integrated with the blockchain stand to gain "real ownership" of their digital assets and identities. Developers of gaming products gain both additional monetization opportunities and, potentially, the ability to offload transaction logic onto the blockchain. The Cardano ecosystem benefits from increased adoption by ordinary users who may not have any interest in decentralized finance products.
However, as things stand now, integration is simply too costly and difficult to be viable for many game developers. A typical Cardano dApp (including both the on-chain and off-chain components) typically requires three components: 1) Smart contracts to be executed on-chain. 2) A browser-based light wallet that allows users to ergonomically interact with the dApp. 3) An application backend (plutus-apps, CTL, GeniusYield Atlas) that provides the "glue" (building transactions, applying arguments to parameterized scripts, balancing transactions, collateral creation or selection, etc) which facilitates a convenient experience for users interacting with the blockchain.
This architecture is not suitable for video game products. Although several game engines implement rudimentary embedded browsers, those embedded browsers are not fully-featured and cannot support the extension-based light wallets used in the conventional dApp architecture. While a game developer could (at least hypothetically) route interactions with the blockchain through a user's browser-based wallet, this leads to an awful experience for users who must configure a light-wallet outside of the game and break immersion (e.g. by "tabbing out") every time they seek to perform an in-game action that interacts with the blockchain.
If game developers wish to integrate Cardano's blockchain technology while maintaining ergonomics for the user, they must develop their wallet and integrate it into their engine of choice. It stands to reason that even game developers who are very enthusiastic about blockchain integration would hesitate in the face of this technical barrier (which falls well outside the expertise of a typical game developer).
Solution
We propose that the best solution to this problem is the obvious solution: Integrate light wallet functionality directly into a game engine while providing high-quality documentation and ample examples. This removes the largest barrier to entry facing game developers wishing to integrate Cardano's blockchain technology into their products.
We believe the Godot game engine represents the most promising avenue for wallet integration. Godot is an open-source engine, which greatly simplifies the work needed to quickly get wallet support up and running. Additionally, Godot is quickly gaining significant adoption, particularly among indie developers (who, we believe, are the most likely to develop innovative blockchain integrations and experiment with new designs and revenue models). Furthermore, because Godot is free and open source, there are no licensing requirements or fees attached to its usage - which makes it attractive even to large game studios. (We note that Godot has recently been used by a major studio to develop a Sonic game, which demonstrates that it is suitable for both small-scale and large-scale development). Finally, Godot supports a robust system for extending the core engine (GDExtension), which promises to make the development of Cardano integration tools relatively painless.
Of course, while light wallet functionality is necessary for blockchain/gaming integration, it is not sufficient for a maximally ergonomic developer experience; ideally, both the application backend and the light wallet would be tightly integrated into the engine.
Subsequent paragraphs in this section will address our strategy in technical detail, but in broad strokes, our approach is: I) Determine if CTL (Cardano Transaction Library, a dApp backend developed by MLabs that supports basic wallet functionality) can be bundled and made available as an extension. II) If CTL can be bundled as a Godot extension, bundle it, test it, and write high-quality documentation. If it cannot be bundled, build a basic light wallet on top of CML (Cardano Multiplatform Library), test it, and write high-quality documentation.
Technical details
CTL is a Plutus application backend written in PureScript which can run either in a browser or node.js environment. In addition to its application backend functionality, CTL implements features necessary for minimal wallet functionality, and therefore a CTL extension to Godot would solve both the “client needs a wallet” and the “server needs an application backend” problems in one stroke.
Node.js provides a C++ embedder API (<u>https://nodejs.org/api/embedding.html</u>). Godot provides both an extension API (GDExtension) which supports C++, and a C++ "custom module API". Our research indicates that it should be possible to package CTL and bundle it either as a GDExtension or a C++ module, which we could then build upon (to improve ergonomics) and document. This is the optimistic "happy path" for the development of the project.
However, as every experienced developer knows, things that should be possible in theory can turn out unworkable in practice. Because we are committed to delivering a solution with our requested budget and in our requested time frame, we have a backup plan if bundling CTL is not a viable approach: Build our light wallet functionality on top of well-tested and widely-used core libraries.
CML (Cardano Multiplatform Library, written in Rust) provides the core functionality upon which wallets and other blockchain utilities can be built. Both of these libraries are widely used in the Cardano ecosystem and are presumed to be reliable (critical components of many dApps currently deployed to mainnet are built on top of one or the other).
We anticipate that building minimal wallet functionality on top of CML and bundling it as a GDExtension (for Godot v4) or a GDNative package (for Godot v3) can be accomplished very quickly. For a game-client wallet, a simple single-address wallet capable of signing transactions and sending funds to other wallets will suffice for the vast majority of use cases, and CML provides all of the necessary infrastructure to rapidly build this solution.
Finally, given the nature of this project (which aims at reducing the complexity required to integrate the Cardano blockchain into gaming products), high-quality examples and documentation are every bit as important as the Godot modules/extensions. Consequently, producing those examples and documentation is an essential component of our proposal. A solution that only experienced Cardano developers can make use of is, in this domain, not much of a solution at all.
Market
Amateur & professional game developers who wish to integrate Cardano with their products. Cardano developers who wish to branch out into gaming products. Indirectly, mainstream consumers of gaming products.
How does your proposed solution address the challenge and what benefits will this bring to the Cardano ecosystem?
Intended Challenge – Developer Ecosystem - The Evolution
Challenge Question – "How do we equip and support developers with tools and working infrastructure? How do we make Cardano their first choice when it comes to building dApps, innovating and collaborating?"
What does this proposal entail?
We believe the scope of this proposal is eminently achievable with our requested budget and time frame. To recap from a previous section, our "happy path" only requires that we successfully bundle CTL and package it as a Godot module. Our "unhappy path" only requires us to implement very basic wallet functionality on top of well-tested and widely-used libraries.
How does integrating a wallet into Godot help developers?
At the moment, any developer wishing to integrate Cardano blockchain technology into a game product must develop their own wallet and bundle it into their application backend. We anticipate that a well-documented Godot wallet (and, optimistically, application backend) will greatly increase the number of game developers able to integrate Cardano technology into their products, which is very likely to foster innovation and experimentation and vastly increase the quantity and type of products that can be built on the Cardano blockchain.
How do you intend to measure the success of your project?
TBD
Please describe your plans to share the outputs and results of your project?
TBD