5 ms·
Unreal Engine 5 ported to WebGPU
- crazygringo 3y agoCan 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?
- kevingadd 3y agoUnreal 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'.
- snarfy 3y agoI 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 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.
- epolanski 3y agoMost 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.
- pjmlp 3y agoStreaming 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.
- deleted 3y ago[deleted]
- jncfhnb 3y agoNot at the moment. Seems likely to be a hack that nobody would use.
- adam_arthur 3y agoThe 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
- warvstar 3y agoNot 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.
- boarnoah 3y agoI 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?
- echelon 3y ago> We are looking to upstream to Epic What's the benefit to your company in this relationship?
- patmorgan23 3y agoSame as all open source, other people can help maintain it, building/extend the functionality, ensure compatibility with other parts of the engine, etc
- jacooper 3y agoUnreal isn't open source.
- ianlevesque 3y agoSource available though. The point is the same.
- dmytroi 3y agoUE5 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.
- kllrnohj 3y ago> 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 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.
- jki275 3y agoBoth Unity and Godot have single button compile to web -- you can export your whole project to webassembly. So it's not a new thing.
- kevingadd 3y agoThis work was apparently done by Wonder Interactive, you can see a previous post about their Unreal browser porting work here: https://theimmersiveweb.com/blog https://theimmersiveweb.com/blog
- Jasper_ 3y agoastlouis44 (the submitter) is also the CEO of Wonder Interactive
- astlouis44 3y agoI'm actually the COO! The CEO is my co-founder, who has also commented on this thread.
- dang 3y agoIs there another link where this work is discussed in more detail?
- astlouis44 3y agoYes there is! Note that it's a bit of an old link, and we've made a lot of progress since it was published: https://theimmersiveweb.com/blog https://theimmersiveweb.com/blog
- ww520 3y agoThis is great news. This opens up other languages using Unreal Engine. This also opens up other target platforms for Unreal Engine.
- jbverschoor 3y agoPerfect.. Although cocos2d / cocos3d have been cross platform forever. Let's see how they'll do content streaming / no loadtimes
- xandrius 3y agoNow time for them to switch to a saner language (say C#), and it'll be great!
- JCoder58 3y agoThere have been a number of community attempts to implement C# as a first-class scripting language. Most fail due the developers running into life. The latest active plugin for C#/.NET is UnrealSharp (https://github.com/UnrealSharp/UnrealSharp https://github.com/UnrealSharp/UnrealSharp). They have an active Discord: https://discord.gg/HQuJUYFxeV https://discord.gg/HQuJUYFxeV
- xandrius 3y agoThat might actually make me want to give it a try! Thanks :)
- TillE 3y agoThe problem with maintaining unofficial language bindings of any kind is that it's an extraordinarily tedious, unrewarding job. It's hard to imagine many programming tasks which are less fun. I've done it a few times, and I've learned to steer well clear of either creating or relying on such bindings if at all possible.
- alex_lav 3y agoC# continues to be the best language I never ever want to use. Maybe UE supporting it would change that!
- CSMastermind 3y agoDefinitely one of the benefits of picking Unity over Unreal.
- not_your_mentat 3y agoHey Thought Police! Are we allowed to say positive things about Unity again?
- wdb 3y agoThink this is are the same people: https://www.youtube.com/watch?v=TI3KVJFz2L0 https://www.youtube.com/watch?v=TI3KVJFz2L0 (Unreal 5.2 on the Web, done properly!)
- benjaminsuch 3y agoI don't see the browser in the video.
- Zetobal 3y agoI get the excitement around it but most ue5 games are giant... I get that pixel streaming is expensive for stupid car configurators but downloading 8gb just to look at your new car... I don't know.
- jsheard 3y agoYeah, the elephant in the room with big games on the web has always been and continues to be data storage. Even if the user sits there and waits for the whole thing to download there's still no reliable way to make sure it stays downloaded until the user decides they want to uninstall it, all caches and storage APIs are subject to the purged at any time.
- warvstar 3y agoWe have the ability to stream in content from our CDN, so even devices with little to no storage capacity can run games of near infinite size. The main issue in today's browsers is the 4gb ram limit, although many games can run within that limit. We have MEMORY64 support as well, removing that ram limit, but it will probably be a few months before some browsers enable MEMORY64 without having to use a flag.
- jsheard 3y agoStreaming solves some of the problems, but the browser purging caches behind your back means you'd presumably have to serve the same data to the same user many, many times in the course of a playthrough. Even if you get a good deal on bandwidth, is that economical? And how wide of a connection does the user need to keep up with streaming high quality assets? Games are already pushing 100GB when you download them up-front, with redundant streaming it's not hard to imagine that piling up to over a TB of bandwidth for one user.
- warvstar 3y agoIt can be, we have our data cached as close to the user as possible, in over 300 locations. It does add some latency, because instead of a 3ms latency to fetch and decompress assets, it now might be 17ms. However, because we also have a memory cache, this can reduce that latency significantly, and we use that for as many small and recently accessed assets as possible. Our virtual fs is multithreaded and works in tandem with Unreals async loading threads, so we are able to fetch multiple assets at a time, reduce wait tune. We also have the ability to know what assets are commonly fetched in a certain period and to fetch those ahead of time. Of course, if you combine bad networks, lack of storage capacity and large projects, you can be sitting around a while, or may not have the best experience. Keep in mind though, that the browsers don't usually evict data from the cache unless you've used up the storage quota, the system is under storage pressure, or the origin has not been accessed in a while. According to them
- astlouis44 3y agoFor anyone interested in learning more, you can join our Discord here: https://discord.gg/prsKfwyzDC https://discord.gg/prsKfwyzDC
- devops3 3y agoThis is unreal! (pun intended)
- nnadams 3y agoI enjoyed this particular WebGPU tutorial last weekend. Nice introduction even if you've never programmed a GPU before. https://codelabs.developers.google.com/your-first-webgpu-app https://codelabs.developers.google.com/your-first-webgpu-app
- parasti 3y agoWhen I see "WebGPU" I have to translate it in my head from a "web standard" to "Chrome-only".
- kllrnohj 3y agoWebGPU came from Apple, hence why it looks a lot more like Metal and refused to use pre-existing standards like SPIR-V.
- bogwog 3y agoThe network tab in Firefox reported 462MB to load the demo at https://play.spacelancers.com/ https://play.spacelancers.com/ I know this is super early, but I wonder how useful this is considering how bloated UE5 projects tends to be. I'd be interested in seeing what a slimmed down demo looks like.
- kevincox 3y agoGames with rich assets are big, that is true. But I don't see why this causes a problem for delivering a game over the web. It seems like the key requirements here are 1. Ask permission first and 2. Strongly cache the downloaded data. This is just like downloading a desktop game. On the other hand the strong sandbox of the web is highly desirable for games which are often closed source and made with low security standards. Native sandboxing may be better for performance but won't be as reliable which is a tradeoff that it is nice to have the option for. The fact that this game can potentially be archived and playable on any device in the future is also very nice.
- jsheard 3y ago> It seems like the key requirements here are 1. Ask permission first and 2. Strongly cache the downloaded data. This is just like downloading a desktop game. There's no sure-fire way to cache large amounts of data in a browser, all you can do is pray that the browser decides to keep it. The more data you load, the less likely that is. It's a problem that has to be solved at the standards level, adding some kind of "persistent data" permission, but it's been a known issue for years and there's been no progress.
- kevincox 3y agoYou can request this via https://developer.mozilla.org/en-US/docs/Web/API/StorageManager/persist https://developer.mozilla.org/en-US/docs/Web/API/StorageMana.... If the browser reports that the request was granted that storage should not be cleared except by explicit user request.
- 3y ago