[GameAWeek] Week #2 Recap

Hello everyone, it is that time of the week again where I recap on my progress thus far, share about what I’ve learnt and what I plan for next week.

This week is undoubtedly my most productive week despite having lesser time than the previous weeks. I was initially concerned about what to spend my time on but as the week started, a project was naturally “conceived” — to build a demo app with Godot and Ethers.

Yes, I know this is a demo application and not a game but nonetheless, this is a great starting project because:

  • I want to build web3 games using Godot. (Why? Godot is royalty free!)

  • I want to learn how to integrate Godot with a library like Ethers instead of using Moralis (p.s. I don’t hate them or anything).

  • There aren’t many examples on how to do this and if I am interested, others might be interested too.

  • I can reuse some of the code for my future projects!

These reasons more than justify why I should work on this app so I went ahead and started building!

What is the Demo App about?

Demo App UI
Demo App UI

This app is a very simple example demonstrating how a user might log into a Godot web3 game with their wallet. Once the user has “logged in”, they can start querying token balances and make token transfers. The intention of this app to showcase how these blockchain interactions can be implemented via Godot’s JavaScript object.

There are a few quality of life improvements aka TODOs but it is more or less completed. It even works for mobile (kind of lol)! The source code can be found here.

General thoughts for the week

There are substantially fewer resources for building web3 games on Godot as compared to Unity. This proved to be quite an annoyance and oftentimes took some trial and error to resolve. I have to give credit to this Godot x Moralis guide as it really helped me to get off the ground.

As usual, looking up “web3” or “blockchain” on Godot’s discord is very disheartening as everyone online thinks that they are an expert on blockchain or that “crypto bros” are out to scam everyone with NFTs. I hesitate to mention blockchain / crypto / web3 when asking for help lest I get banned from the server.

Another big problem that I faced was integrating with external 3rd party libraries. Unlike ESM modules where you can just import, with Godot I have to spend some time looking for the correct CDN URL to use in my <head> tags (hint: UMD works well for vanilla JS!).

Lastly, the building and testing of HTML5 game builds in Godot is very inconvenient especially if you need to interface with an external library. The built-in HTML5 scene tester is unable to pull in the imported packages mentioned in head include so whenever I want to test a new change, I have to resort to exporting the project, run a local server and test it on my browser.

What’s planned for next week?

I’m actually super duper excited for next week. I want to build an NFT viewer, almost like a pokedex but for NFTs. That’s all I will say so if you’re interested, stay tuned for next week’s recap!