News for hackers. Stuff that matters.
Re:Unreal Engine 5 ported to WebGPU by crazygringo on Thursday February 15, 2024 @01:34PM (#39386452)
Can UE5 games be compiled to WebAssembly?

As someone who knows very little about this space, is this just a hack for fun that nobody would actually use, or does it herald the possibility of an entirely new set of games that run in the browser?

Re:Unreal Engine 5 ported to WebGPU by warvstar on Thursday February 15, 2024 @02:51PM (#39387655)
Not from the official source, but we (Wonder Interactive Inc.) have a custom version of the engine that compiles to wasm. We are looking to upstream to Epic, or at least have a plugin that doesn't require custom source.
Re:Unreal Engine 5 ported to WebGPU by boarnoah on Thursday February 15, 2024 @04:47PM (#39389474)
I love the idea you folks are trying to get this upstreamed, would benefit everybody.

IIUC the reason HTML5 was dropped in the first place was for the big render re-work that went on during 4.27 + 5.0. So now seems like a good time to add modern WebGPU support back.

Do have to ask, isn't your business model for "theimmersiveweb" built around this WebGPU capability? Providing that tech to others or making your site a marketplace for web games?

Re:Unreal Engine 5 ported to WebGPU by echelon on Thursday February 15, 2024 @06:54PM (#39391021)
> We are looking to upstream to Epic

What's the benefit to your company in this relationship?

Re:Unreal Engine 5 ported to WebGPU by patmorgan23 on Thursday February 15, 2024 @09:23PM (#39392346)
Same as all open source, other people can help maintain it, building/extend the functionality, ensure compatibility with other parts of the engine, etc
Re:Unreal Engine 5 ported to WebGPU by jacooper on Saturday February 17, 2024 @03:54PM (#39413462)
Unreal isn't open source.
Re:Unreal Engine 5 ported to WebGPU by ianlevesque on Saturday February 17, 2024 @04:15PM (#39413626)
Source available though. The point is the same.
Re:Unreal Engine 5 ported to WebGPU by dmytroi on Thursday February 15, 2024 @03:48PM (#39388579)
UE5 dropped support for 32 bit platforms, so at the moment not without some code changes.

WebAssembly is working on adding support for 64 bit address space though.

Re:Unreal Engine 5 ported to WebGPU by jncfhnb on Thursday February 15, 2024 @01:42PM (#39386594)
Not at the moment.

Seems likely to be a hack that nobody would use.

Re:Unreal Engine 5 ported to WebGPU by adam_arthur on Thursday February 15, 2024 @02:03PM (#39386913)
The screenshot on the post appears to be running in the browser. So probably yes?

I doubt they are exporting pure JS interacting with WebGPU, but no idea really

Re:Unreal Engine 5 ported to WebGPU by kevingadd on Thursday February 15, 2024 @01:35PM (#39386475)
Unreal previously had built in support for asm.js + WebGL, so it's pretty reasonable to expect that you can compile UE5 games to WASM. The question is whether they will run, and it looks like the people responsible for this demo have ported the renderer, which is a big part of the equation. You would also need to port things like input, sound, filesystem and networking, but since they're loading textures and models, filesystem is probably ported too.

The browser is still pretty bad for deploying large applications like a UE5 game, so your guess is as good as mine when it comes to 'will people be able to actually ship this way'.

Re:Unreal Engine 5 ported to WebGPU by snarfy on Thursday February 15, 2024 @02:20PM (#39387180)
I remember their 'citadel' demo. I recall it disappeared rather quickly. All that seems to have survived is a youtube video of it. https://www.youtube.com/watch?v=c2uNDlP4RiE

> The browser is still pretty bad for deploying large applications like a UE5 game

    Please wait, downloading 80gb of content....don't refresh page or clear browser cache...ever
I do appreciate the achievement here, but it's not something I personally would want.
Re:Unreal Engine 5 ported to WebGPU by epolanski on Thursday February 15, 2024 @06:14PM (#39390620)
Most of the code isn't source code but assets and those can be streamed.

Realistically even the toughest AAA games can be tuned to few GBs of code and the assets required for the initial area. I remember on UE4 you could compile the entire executable with some small game in waaaay less than a GB without particular difficulty. You can use this approach and stream the rest later.

This is especially doable if you keep the game state and menus/UI in the html + JS and avoid that part of UE entirely, so you just launch whatever is your map and game and those states.

Re:Unreal Engine 5 ported to WebGPU by pjmlp on Friday February 16, 2024 @01:45AM (#39393976)
Streaming is much better option, latest hardware instead of 2011 WebGL and 2015 WebGPU, and guarantee it works on the client without having to worry about black listed GPUs and drivers, leaving a empty black box for the user to see.
Re:Unreal Engine 5 ported to WebGPU by kllrnohj on Thursday February 15, 2024 @06:48PM (#39390964)
> is this just a hack for fun that nobody would actually use, or does it herald the possibility of an entirely new set of games that run in the browser?

99.99% just a fun hack. Running an engine like this in the browser is massively overkill in the sense that most of the code & features are going to be dead weight you don't actually want. You can't actually run any UE5 game in this way that actually benefits from UE5's advancements over UE4 or Unity or whatever, the assets are too big. You're not exactly going to stream 10GB+ of models & textures on-demand. You could build such a thing, but the engagement you're asking from the user at that point certainly justifies just being a native app and providing a much better experience.

That said, Unreal Engine is also pushing into the non-AAA gaming domain, and it's possible a smaller, easily run indie game ends up using the engine and still sees value in a browser-based deployment. Something on the scale of Vampire Survivors ( https://poncle.itch.io/vampire-survivors ), although that's using Unity but in theory there's no reason you couldn't do the same with UE5.

Re:Unreal Engine 5 ported to WebGPU by jki275 on Thursday February 15, 2024 @08:27PM (#39391885)
Both Unity and Godot have single button compile to web -- you can export your whole project to webassembly. So it's not a new thing.