We have web3.js for JavaScript, web3j for Java and NEthereum for Unity/.NET.

I want to develop with Unreal Engine (C++) a game that runs on Polygon, but there's no integration library in C++.

Should I bother trying to make a basic implementation of NEthereum/web3.js written in C++? Or are there any specific reasons of why C++ is not a preferred language?

Also, I guess that in the future we're going to have more desktop blockchain games; if that's the case, we're also going to need a 'Desktop Metamask', or a convenient wallet that can be easily integrated to interact with desktop applications.

For this situation in particular, option A would be handling wallets inside the game (unsafe), option B would be developing an easily verifiable and open source C++ wallet (so we can create an UI/interface for it in Unreal) and transactions would be signed outside the game. Option C would be implementing WalletConnect in C++

Would developing this bring real value to the ecosystem? Or should I build a similar approach to 'Etherlinker' where they use a localserver for the EVM integration

  • 1
    It is just that there wasn't enough interest. From time to time someone will ask about C++ and sometimes they will get an answer, for example ethereum.stackexchange.com/a/103686. There's Aleth a C++ client github.com/ethereum/aleth, but the project isn't very active. If you are willing to write such library for C++ you should consider asking the Ethereum Foundation a grant.
    – Ismael
    Sep 28 at 0:17
  • 1
    IMHO option A would be handling wallets inside the game (unsafe), is not unsafe, if users just use this for tokens within the game. There Option B, you have other options (although not hardened) github.com/Nethereum/Nethereum.UI.Desktop or you have github.com/Nethereum/Nethereum-Explorer-Wallet-Template-Blazor examples to get started. WalletConnect will require a C++ implementation anyway, which takes you to point A (less the signing). Now another option will be to interop with the Delphi implementation, I don't know how suitable will that be in your environment. Sep 28 at 11:29
  • 1
    Yet another option for Unreal could be github.com/nxrighthere/UnrealCLR, although if all your code is in C++ I don't know how good the interop will be. Sep 28 at 11:31
  • Thanks for the responses. @Ismael I think the interest will grow over time if adoption keeps growing. Yes, I've checked the Aleth, but as you mentioned its only a client, sadly it's not a library.
    – monkjuice
    Oct 5 at 21:55
  • @JuanBlanco I tried implementing UnrealCLR, but it's basically a dependency nightmare to deal with because of Nuget packages. We will use NEthereum as a localserver for a short-term solution and keep analyzing on developing a native library for C++.
    – monkjuice
    Oct 5 at 21:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.