I was feeling great. I had just announced my bilingual word game, Bilingdle, on social media, and the immediate response was overwhelmingly positive, especially among my friends and family on Facebook. Several months of work in my free time were being validated by this pleasant reception. But then someone mentioned the game had crashed on their phone. Another person said the same and sent me a screenshot.
My friend told me they were using Chrome on a Samsung phone. I opened the game in Chrome on my own non-Samsung Android phone and was horrified by the same awful screen. My primary browser on my phone is Brave, and it worked fine. I could swear I had opened the game in Chrome just a few days ago, and it was fine. What was going on?
I quickly came across this bug report filed on the GitHub page for Godot, the game engine I used to create my game. It had been filed just two days earlier, confirming that something had recently changed in Chrome and was affecting others as well. This was not good news. The default browser on the most common phone OS was crashing on my game that I had just shared with everyone I know. Not sure what I could do about this, I told my friend I would look into it.
You’re using Chrome, even when you’re not using Chrome
I wished the easy answer was to tell people to stop using Chrome. To suggest using Brave, Opera, Edge, or Firefox. However, besides the fact that no one would switch browsers just to play my little word game, all of those browsers, except one, had a fatal flaw. They were all just Chrome in different clothes. The crashing problem was inevitably going to affect all of those other browsers (except Firefox, God bless it) in a matter of days.
And so began the questions of self-doubt:
How do I fix this problem when it’s not even my code that’s causing it?
Can I even figure out how to debug this? And if I can, would I be able to fix it?
Was it a mistake to write a game meant for the web in Godot?
The Pit of Despair
A couple of people commented on the Godot bug report, stating that they downgraded from Godot 3.5 to 3.3, and that solved the issue for their games. I tried it, but my game had weird display issues when using 3.3 that made it unusable. Somewhere, I got the idea to attempt to recompile Godot with several of its built-in modules disabled, thinking it might be possible that some feature of Godot that I don’t even use in my game might be causing the crash. A nice side-effect of this would have been a smaller WebAssembly file and faster load times for my game if this worked. My initial attempt did not succeed; my game wouldn’t load. It was likely I disabled something I shouldn’t have. It was going to be a lot of work to figure out what needed to be enabled and what could be disabled, but I wasn’t sure I had any choice, short of a rewrite in some other language or just giving up completely.
I was completely discouraged. I took a break from working on the game. The Godot bug report was a week old, and while people were talking about it, no one seemed to be doing anything to fix the issue.
As expected, Brave was updated on my phone, and now I had to be the one to switch browsers just to play my game on my phone.
It felt like this was going to be a problem for months, and I would completely lose all motivation and excitement for this project.
Reassembling the Infinity Gauntlet
I received a notification about a new comment on the bug report that said that rebuilding the game with the Mono version of Godot works. At first, that didn’t mean much to me. I wasn’t using C# for this game; it was written entirely in GDScript. But others started to confirm that this fixed their issue too.
So I tried it, which thankfully meant I only needed to change a line or two in my CI/CD workflow. Lo and behold, the game was working again. Working in Chrome. Working in Brave. I got my friends to check it out on their phones, and it worked for them too!
What a relief! Maybe I don’t need to give up on this project. It was supposed to be a fun project after all.
The Post-Credits Scene
Although the issue hasn’t been addressed in Godot yet, someone who works on Chrome took notice of the issue and pretty rapidly started working on getting the crash addressed in the browser itself! My respect for the Chrome team went up seeing how quickly they started addressing the situation once they were aware of it.