Unreal Engine in WebAssembly/WebGPU

Bookmark

Traditionally, browser games haven't been taken seriously. If you want to target the web, that traditionally has meant compromising on your vision as a game developer. Our team at Wonder Interactive is on a mission to change that, bringing one of the world's premiere native game engines to the browser - Unreal Engine. In our talk, we'll dive into our efforts porting the engine to the browser and carrying on the pioneering unfinished work started at Epic Games nearly a decade ago in collaboration with Mozilla. We'll dive into what this means for the future of games in the browser, and the open metaverse on the web.


Transcript


Intro


Okay. Hello and welcome. My name's Alex St. Louis. I'm the Co-Founder and Chief Operating Officer of Wonder Interactive. Delighted to be speaking to you today about Unreal Engine in the browser. Just a bit of context on my company. We're on a mission to bring one of the world's premier native game engines to the browser, enabling cross platform, real-time 3D applications and games, enabling developers to ship their applications without the need to go through walled garden storefronts, and pay 30% fees to storefronts, and distribute directly online to their users.

[01:04] So, a little bit about my background actually come from the realm of film and TV. I had an agent for a while, did some film here in Canada. Lifelong passion for media, games got me started on the road to the video game industry. I think browser games were the first games that I ever played, had access to on just a regular computer. The ability for me to click a link and just instantly jump in was like magic to me, Club Penguin, Runescape, those are some of my first real games that I remember playing as a kid. Started researching the Unreal Engine a few years ago, got really into it, quite fascinated by the intersection of film, and games, and where real-time 3D is going. My Co-Founder Rob Stewart, who is not present for this talk, his background's in computer science, and he's been working with the Unreal Engine for several years now.

So, as I mentioned, our vision is to create the most open platform on the web, and alternative app platform for developers to freely distribute their games and real-time 3D apps on the web, and you should be able to ship one code base, one binary, and it should perform the same across all devices. That's our belief. You shouldn't be hampered by walled gardens that demand to cut our... Have rules and regulations in place. You should be able to host deploy monetize on your own terms as a game developer.


History of Unreal in the browser


[02:51] So, how we got started, one of Rob's initial clients with one of his software development companies was interested in web-based support for their Unreal Engine game. I was interested in web support around the same time. Rob and I connected, and we realized the real commercial opportunity around the new technologies, WebAssembly, and WebGL, and how they would, once again, just disrupt the method of distribution for games online, and we started working together. We founded our company, Wonder Interactive, raised some seed funding, and last year, we officially kicked off.

So, we did a bit of research into Unreal Engine on the web. And it turns out that since Unreal Engine 3, Mozilla actually partnered with Epic Games to bring Unreal Engine to the web. And as you can see here in this... gif, that's representation of actually what was a mobile game called Epic Citadel. So, kind of like World of Warcraft style graphics. Now today, that's about OpenGL ES 3.1. So, about a mobile game, several years old mobile game. That was running in the browser and also on phones. So, it was an effort and a collaboration between Mozilla and Epic to see how far could web and 3D on the web can be pushed. And this actually turned into robust support in Unreal Engine 4, with the release.

[04:34] Once 4.23 version of the engine came out HTML5 support was officially deprecated and removed. There was only WebGL 1 support present in the engine at this time. There was no optimization for file sizes, so you would have these very large binaries that you'd be requesting the user to download over the network. And as you know, on the web, as many of developing games, an instant start time is crucial. The time from your users clicking a link to jumping into the action, it has to be as minimal as possible to be successful. That's what users expect, the same way that they expect a 2D webpage to load quickly and populate with content. They also expect the same for games on the web, any type of content on the web, quite frankly. And below there's a blog post, if you want to check out more on the history of Mozilla and Epic's work together. As I mentioned, we raised a small seed round last year, started filling out the team. We also reached out to Epic games and we wanted to see where they were at, to see if they'd be interested in us picking up the torch from where they left off, what we considered unfinished work.


Development


[06:06] So how far have we gotten? We've actually added support to the latest versions of Unreal Engine. I'm quite happy to say 4.24 all the way up to 4.27, since 4.23. As I mentioned, Epic, publicly removed support and made it a community supported platform extension, but nothing has really been done with it. So, we've actually built out support for the newest releases of the engine. Unreal Engine 5 is in the works. Now WebGL 2 is based upon Open GL, which is an old API, it's decades old. And so, WebGPU is clearly the future of 3D on the web, because you're going to get that Vulcan quality graphics API, that can fully tap into modern hardware. And so, this is a quantum leap from what you can do today. So, we are currently working on a WebGPU backend for our platform, for Unreal Engine.

Some of the other innovations are initially, as I mentioned, with previous versions of HTML5 support and Unreal, you would have to ship a very large binary. There was no code splitting. There was no really good file compression. You can't just ship a mobile game or PC game on the web. You need to do it in a different way, in a web way. So, what we've done is we've added much, much improved compression, basis compression, actually, texture compression. And we've also built our own asset file system that streams in assets as needed dynamically. So, only the content that you need to see at any given time. 

[07:52] So, if you are a user, you're a developer creating a game, and you ship that game, you say, "Okay, so the user is only going to need the first 5% of the game because that's actually the menu. And maybe another couple percent. Let's say 7% of the game. The menu, and the intro screen, and the cinematic, and then, the first lobby that you load into with a bit of gameplay." You don't need to load the other 93% of the game. You can do that while the user's playing the game. You can actually fetch in all those assets at run time, and it's a much better overall user experience. We're also going to be supporting protocols like web transport. So, we're going to have a much faster way to actually do a real-time networking on the web for games. And as I mentioned, WebGPU support. We've brought on a developer to work on that, because it is indeed the future.


Features of the platform


[08:56] So, about our platform, what do we actually offer? So we offer a hosting platform, a front end dashboard and discovery service for developers and a suite of powerful and flexible tools. So, starting with the Wonder SDK, as I just mentioned, the basis texture compression, we've added that in, we have a pipeline for exporting to HTML5, that's available with a custom version of our engine, either the source version or binary tools, and an asset streaming system, that's actually hosted on a global CDN Edge network.

We've also put together a WonderNet, which is a suite of networking libraries for both peer to peer and client server communications. So if you want to do peer to peer, if you want to do classic client to serve in your game, you can do so. You can run online games, and then the Wonder dashboard for uploading your builds, setting new revisions as active, and just in general provisioning and maintaining your builds.


Demo


[10:04] I'm going to show you a demo today. We also have a video here, but just going to show you this demo. Click. I'll show you the castle demo today. Now, the first time that you actually load the game, it's going to have to pull all that data down, but the next time that you load it's going to be much faster. So, this was my first time loading it. And as you can see, this is for client side binary. So this is probably the most impressive 3D browser demo you've ever seen. You can achieve far beyond this with pixel streaming, but obviously you're then requiring the user to have a very fast network, whereas powerful hardware is very pervasive, so why not leverage that? Utilizing web technologies like WebAssembly, WebGL, WebGPU, and soon to be WebXR. So, let's go back to the slides here.


The Future


[11:26] Save that video for another day and... What else are we working on? We're also working on support for other engines to actually target the web. So, Unity has had HTML5 support for many years now. It's not in the best place. The aforementioned issues around file sizes, networking, it's quite honestly a bit of a mess. And so, once we finish up our support for Unreal Engine, we're then going to commence work on Unity, and we want to get it so you can... As a developer, build Unity or an Unreal world, ship both to our platform and have the ability for users to jump from one to the other. These worlds, virtual worlds should live beside one another. And to me, and to our team, quite frankly, that is the metaverse. When you can jump from world to world, when you can click a link, and you have true interoperability between separate worlds made with different engines, that's the future.

We're also working on support for Godot, the Godot game engine, and Amazon's Open 3D Engine for WebAssembly support. And we are, of course, going to have Unreal Engine 5 support on the web as well, once Epic games, ships UE 5 later this year. Also, we are very excited to announce that we're working on WebXR supports enable cross-platform VR applications through any browser, through a headset. So, Apple is going to be releasing headset fairly soon. The Oculus Quest 1 and 2 are the most widespread headsets out there to date. You got Valve coming out with a headset. There's going to be a proliferation of these headsets in the next few years. And being able to empower developers to ship to all of those devices with one code base, and knowing that it just works, there's no intermediary that needs to interfere with the distribution of your applications. Right once run anywhere is truly what we're about here. And we think, like I mentioned, stitching these worlds together. When you can jump from a virtual experience or virtual world. That's not only 3D on phones, and computers, and laptops, and tablets, but fully 3D and immersive on headsets. When links become portals and flat pages become immersive spaces, and rooms, and worlds, this is the future that we're quite excited about. So, we're going to have WebXR support for both Unreal Engine and Unity Engine.

[14:25] And I believe, this is when we're going to go into the Q&A, which we will be doing live, so I'm going to skip over that. And our final call to action, if you're a developer that has utilized Unreal Engine and anything that I've said here today excites you, please come and talk to us, we would love to hear about what you're working on.

We're building these tools and platform for you, to enable you to ship, distribute, deploy, and be successful with your applications, and run them on any device. So, we have a Discord that I've linked in the slide. You can also sign up for our service for early access. And if you're interested in a role for our company, also feel free to reach out, we are indeed hiring. And thank you so much for tuning in. I can't wait to hear the rest of the talks of this conference. And I really hope that you have a great rest of your summit. And thanks so much for coming to listen to me speak about our work that we're doing. Thank you.


Questions


[15:34] So my favorite game is actually a title that probably not a lot of people have heard of. I hope some developers out there, and gamers, have heard of it, it's The Curse of Monkey Island. It's a game by LucasArts, now owned by Disney. Just really fantastic game in terms of visual, storyline. Interestingly enough, Ron Gilbert, I believe his name was, created a game engine that had unique patents for in-game audio to trigger events in-game. So, maybe when you would step off a pirate ship or onto an island, it would actually trigger a soundtrack. And that was unheard of at the time. So, I remember playing it as a young kid on my computer and just being totally blown away by the experience. So…

[16:28] Sahar Pournasseh: It was actually super cool. I see we have Civilization as the top results here. Yeah, that's interesting. And actually, I made sure that Doom is up there, so yay to Doom lovers.

Alex St. Louis: The classic.

[16:47] Sahar Pournasseh: Yeah, exactly. We also have Shadow of the Colossus, of course. GTA 5, Elden Ring, yeah, lots of great games. Witcher, Legend of Zelda, Omari, that's for you. Curse of Monkey Island. Yeah.

Alex St. Louis: It was my submission for sure.

[17:16] Sahar Pournasseh: I guess. Yeah, that's super cool. So, let's get back to your questions. We actually have lots of questions because it was really interesting to see what you did. The first question I have is that the demos looked really cool, can we see them? Are there links to that?

[17:41] Alex St. Louis: Yes, absolutely. So, you can actually go today, to play.immersiveweb.com that will actually redirect you to /play domain. And you can today, try out a bunch of demos that our team has thrown together. I myself created the Castle demo going for a bit of a Dark Souls aesthetic there. And yeah, we have a few demos up cartoon visuals, a few mobile-esque games, because this is running on WebGL 2, all of our demos today, it's equivalent to OpenGL ES 3.3, sorry. So you're essentially getting mobile game quality, which in Unreal actually can be quite good, but what we're really looking forward to is having WebGPU, so we can get that Shader model 5.0 quality visuals, so we can actually deliver games in the browser that can rival something from, say like Steam. Yeah.

[18:46] Sahar Pournasseh: Yeah. That's super cool. If you could post the links and Discord, that would be awesome.

Alex St. Louis: Absolutely. I'll do that.

[18:54] Sahar Pournasseh: Yeah, thank you. And I have other questions for you. The first one is, as developers, do you think bringing Unreal Engine to WebGPU will shift the landscape of the industry and enable a new distribution path that doesn't evolve walled gardens?

Alex St. Louis:I was just posting that question there.

Sahar Pournasseh: Yeah. Okay. Do you want me to repeat the question?

[19:25] Alex St. Louis: Do I think that the Unreal Engine is going to bring in a new wave of games for developers?

Sahar Pournasseh: Yeah, yeah, exactly.

[19:34] Alex St. Louis: I personally believe it's going to be transformative because, today the Unreal Engine is the leading real-time engine for photorealism in terms of games... Not just games, but non-gaming use cases as well, like enterprise 3D, product configurators, virtual showrooms. And like we've seen with leading social games like Fortnite, a catalyst for virtual concerts and virtual performances. So to date, we've never had the fidelity that Unreal Engine can bring in the browser and the browsers have never been able to do as good 3D visuals as they can today. And tomorrow is going to be even more exciting again with WebGPU. So today, you can ship a mobile looking game or a few years old looking PC game in WebGL 2. But once we ship WebGPU support in the Unreal Engine, with the support of Epic Games, to make this a proper platform target for developers, just like Unity's work to bring the Unity Engine to WebGPU, you're going to finally start seeing these console quality games in the browser. So, I personally think it's going to be transformative. We picked Unreal because we're just so impressed with the functionality and feature set that this engine provides. And it's a large engine, but it has a lot to offer. And I think, bridging the gap between native and the web is a noble effort. And I think, developers, gamers, everybody in the entire industry is going to benefit as a whole. And our goal is really to open up a new platform for distributing these games where you don't need to go through a walled garden and forfeit 30%. So, we like what Epic's doing in their fight against Apple, and we think that this is a solution.

[21:38] Sahar Pournasseh: Yeah. That's very exciting actually, to hear Brandon talk too about that. It's actually really exciting to see it happening. I don't think we have enough time, but I'm going to ask you questions really fast.

Alex St. Louis: Okay.

[21:54] Sahar Pournasseh: So, we have another question. How is a UE 5 launch going to impact everything he talks about today?

[22:03] Alex St. Louis: Yeah, no, I was anticipating this question. Obviously, hot off the release, the official release of UE 5, everybody's wondering, are we going to be able to support this? So with WebGPU, we're going to be pretty close to native, so we are planning to have Ninite support in the browser. Lumens going to be a bit further off because that's quite intensive, and essentially Ray Tracing in the browser, isn't really a spec that's been defined by the browser vendors yet, although I do expect that to be a thing. For shipping games that don't have crazy looking visuals and are essentially mobile/PC games, using the new tool set of Unreal Engine 5, we fully plan to support it.

We're going to have WebGPU support in the coming months, later this year. And we're also working on WebXR support as well, so that game developers can ship across platform 3D experiences, so you can have a unified experience, so if you access it across Mac, PC, Linux, phones, but then also not just flat screens, if you put on a headset, you should be able to toggle VR and then enter your scene. So, we see this as a path to a distributed open metaverse, and Unreal Engine is really leading the way for the most powerful tool set and the most realistic, real-time 3D visuals. So, we're very excited to bring the Unreal Engine 5 to the web as well.

[23:42] Sahar Pournasseh: That's super cool. Thank you. And another question is that your site has general availability for Q1 2022. Is this still the target?

[23:54] Alex St. Louis: Yeah. So, we've obviously missed that target. We were waiting on Unreal Engine 5. So, now that's released, we're going to be updating our site very soon here. We've had an enormous amount of demand for our suite of tools and our platform, so we're working as fast and as hard as we can. We're a small lean team. We're looking to get actually a mega grant from Epic to aid us in this, and yeah. But stay tuned for more updates, and if you haven't signed up already on our website, please do so. Also, check out our discord group for Wonder Interactive and the Immersive Web platform.

Sahar Pournasseh: Thank you.

Alex St. Louis: Thank you.

[24:41] Sahar Pournasseh: And still more questions. Are you planning to address huge build sizes and to make UE 5 builds comparable to other engines or do you hope that people would be more interested in high quality games? And what might the first time download speed?

[24:55] Alex St. Louis: Yeah, I know, it's an excellent question. Trying to remember if I address this in my talk, but large file sizes are one of the big issues and that's, historically, and that's why Epic actually removes support for exporting HTML5 back in 4.23 release of the engine. So, we've effectively solving this. We realized that large file sizes were one of the biggest issues that developers were coming to us with, and that we ourselves noticed, and so we set up to solve that problem. So, we approach this in a few ways. We have an advanced compression library that we've imported into the engine, that allows for crunching down of textures, which reduces file sizes. We also have a custom asset file streaming system that dynamically loads in only what's needed for the player to see at any given time. So, you're not going to need 80%, 90%, a 100% of a game, which might be gigabytes.

You can actually load in the menu, which might be 20, 30, 40 megabytes, or smaller with our compression, and everything else can be loaded in at run time, dynamically in the background as needed. The user should have the quickest experience possible. And for every few seconds that you're making your user wait, you are actually increasing your bounce rate. So we're continuing to improve our optimizations and speed up our... Continue to advance our tools and continue to speed up our load times and... Yeah, stay tuned for more on this, but we're feeling pretty good about it already. We're aiming for sub second, sub 10 second load times for most games on our platform. Yeah.

[26:41] Sahar Pournasseh: Thank you. And another question is that what proper HTML5 support in Unreal encouraged you to use the engine for your next browser game?

[26:52] Alex St. Louis: Oh, I think this was a question I was directing at the audience. I was assuming that was for the audience, not myself.

Sahar Pournasseh: Oh, okay.

Alex St. Louis: I, as a developer, prior to working on this, I actually tried to ship a game, a first-person shooter game, and was unable to do so because of the monolithic sizes of file binaries. So we set out to solve this, my co-founder and I, so if I weren't working on this and I were a developer using Unreal today, this is something I would absolutely be interested in. And I would pose that question to others out there as well. Would you make a browser game with Unreal, with proper support? I think many would. And that's why most developers are turning to Unity, which has slightly better support, and actually has a ability to export HTML5 today, just like the Godot Engine and various others. I'll mention as well that we're not just focused on Unreal Engine.

We're planning on expanding our tool set to Unity as well. I know there's work. Brandon's working on WebGPU. We think some of the optimizations we've done are going to assist with that. So, we plan to support Unity developers on our platform. We're also going to be working to support the Open 3D Engine, 3D Engine from Amazon, which is open source to WebAssembly and WebGPU as well. And we plan to basically support any engine that's native, and we think bridging all of these game engines together to create a universal way to target a large user base for developers is the way to go. So…

[28:35] Sahar Pournasseh: Yeah. Thank you. Super cool. And also, what are you thinking about Brendan working on the GBU like Unity, does it affect your work?...

Alex St. Louis: You cut out. Sorry. Can you repeat that?

Sahar Pournasseh: Oh yeah. Sure. What do you think about the thing that Brendan is doing with WebGPU and Unity, does it have effect on your work or something like that? Is it linked to your work?

[29:06] Alex St. Louis: Yeah, so Brendan's work to bring Unity to WebGPU is amazing, and we're going to stand on the shoulders of giants, the work that they're doing. And I hope that we can assist in that as well. Again, we have some optimizations that we think... that we know that Unity hasn't implemented yet, and we'd love to assist with that. And again, we are building not just a platform and a suite of tools for developers to target the web, we're also building a portal and a discovery service, to kind of aggregate everything together in a complete software as a service platform targeted that developers so that they can succeed without needing to utilize Steam or other walled gardens, with an industry leading revenue share as well. But yeah, very excited for Brendan's work and we hope to work with them at some point in the future.

[30:03] Sahar Pournasseh: Yeah. That would be really good to see. Really cool to see.

Alex St. Louis: Thank you.

Sahar Pournasseh: I think we have a little bit more time. So, if you want to talk about something more in more detail, it would be awesome.

[30:17] Alex St. Louis: Yeah. If this talk's been of any interest to you and seeing the Unreal Engine in the browser is something that you want to see happen with WebGPU, we're trying to convince Epic that this is going to be absolutely huge for developers, so if you could let Epic know, on the forums, if you're an Unreal Engine developer, we're trying to basically make this pitch that the leading game engine needs to have proper web support, and it's going to be left behind quite frankly, by the likes of unity, which is going to have proper web support. And I think for the metaverse, it needs to be accessible across every platform.

And the web is the one platform that's existed everywhere. It transitioned from computers to phones, I think it's going to transition over to VR as well. And the fact that you don't have a middleman or an intermediary as a developer, to interfere with the distribution of your application, you can distribute directly online to your users, on your own terms, independently. It's very empowering, and that's the mission that we want to see happen, and we want that for all game developers, regardless of what engine they're using. So yeah, I just wanted to mention that and, yeah. Thank you.

Alex St. Louis
Alex St. Louis
33 min

Check out more articles and videos

Workshops on related topic