johnryanaudio

Ludum Dare 48

First game in Godot Engine!

Wow, what a weekend! I doubled up this week on games, creating my first game as a solo programmer and artist while still writing music for my usual team (shoutout to https://ldjam.com/users/archimagus ). Big thanks to my jam partner, Sarah Hines, for writing all of the story; which is pretty crucial in a visual novel :wink:

https://ldjam.com/events/ludum-dare/48/augmented

Let the ratings begin!

Play and Rate time!

It's time to play and rate games. Visit me at https://live.w0rmh0le.net and tell me if you have a game you want me to play and rate!

What's up with Unity's WebGL export?

Playing Jam Games (or, trying to)

Since I can only play Web and Linux builds, I find myself very limited to what I can play. This jam, I'm really going above and beyond what I usually do to play and rate, but I'm finding it hard to play all the games I want to.

Unity is arguably the most popular engine in these jams (and overall, too?). One of the benefits to using Unity is that you are able to build cross-platform, including MacOS, Linux, and the Web. Despite this convenience[1], it seems most people don't build for Linux, and MacOS to a lesser extent, and rely on WebGL builds to provide for the non-Windows users. In theory, this seems like a fair compromise.

The Problem

In practice, however, this does not seem to be working. A suprisingly high number* of WebGL games have just flat-out not worked for me, in both Firefox and Chrome-based browsers. I know it's not simply a Unity problem, because some Unity WebGL games work just fine for me. But many just hang and never load. I've checked the console logs for these games, and they all throw warnings and errors such as:

  • Feature Policy: skipping unsupported feature name...

    • "autoplay"
    • "midi"
    • "monetization"
    • "xr-spatial-tracking"
    • "gamepad"
    • "gyroscope"
    • "accelerometer"
    • "xr"
    • "autoplay"
  • Content Security Policy: Couldn't process unknown directive...

    • 'noscript-marker'
    • 'script-src-elem'
    • 'script-src-attr'
  • [Deprecation] SharedArrayBuffer will require cross-origin isolation as of M91, around May 2021. See https://developer.chrome.com/blog/enabling-shared-array-buffer/ for more details

  • getGamepad will now require a Permission Policy. Please update your application accordingly. For more information see https://github.com/w3c/gamepad/pull/112

Why is Unity WebGL so broken?

Now, I haven't used Unity at all in over a year, and it has been even more years since I used Unity for more than just a game jam--only because it's the engine my main team still uses--but I am shocked that "the most popular game engine" has this many problems with the WebGL platform.

So, I wonder, is this just me? Is anyone else experiencing this too? Are developers building WebGL builds aware of this problem? Really, please comment, I would love to know!

[1] Is building for MacOS or Linux convenient?

I had started using Unity ~2011, and worked with it quite regularly until a few years ago, when I only used it for game jams. As I mentioned, my main jam team still uses it for jams. In all that time, I can't recall ever having a real problem building for MacOS or Linux. So I wonder why devs still aren't producing native MacOS and Linux builds. Is there some problem that I haven't experienced, or has something changed that I'm unaware of? For LDJam 48 I didn't touch the Unity project for Gettin' Diggy Wit It, I only composed music for the game, but my team still produced a Linux build for me. And they didn't mention having any problems doing so.

Have you had problems building for MacOS or Linux with Unity? Do you have any particular reasons why you're not building for these platforms?

A new reason to build native

Since, in my experience, WebGL builds are becoming increasingly more broken, I think it's more important than ever to produce native builds for all platforms. Even if you think that the number of non-Windows is users is low and you want to just appease them all with a web build, please consider us. We want to play your games too!

A plug for Godot

I have switched to Godot Engine, and this jam was my first time completing a game with it. It may be a little behind Unity in robustness (it's only been around for half the number of years), but it is just as free (as in beer) as Unity, and even more free (as in freedom). Also, every Godot game I've played in the browser has just worked. I smile every time I see that simple loading bar that tells me I'm about to play a game made with the Godot engine because I know I'm actually going to get to play this game. You can build 2D and 3D games with Godot, the learning curve is very low if you are coming from Unity (C# is a supported language now), and you can build for Windows, MacOS, Linux, and Web.

The point of this post is not to push Godot, but to talk about Unity WebGL. However, if Unity WebGL really is a problem, like I've experienced, then I think it makes sense to offer Godot as a solution. If you think this is a terrible solution, please comment and tell me why.

* I do not have actual metrics for the percentage of Unity WebGL builds that have failed vs worked, but I can say confidently I've had to skip 15+ games for this reason. If you really want me to compile some stats, let me know and I'll try to throw something together if people are interested.