Most active commenters
  • seanisom(5)
  • pjmlp(3)

←back to thread

579 points seanisom | 20 comments | | HN request time: 0.867s | source | bottom

I used to work at Adobe on the infrastructure powering big applications like Photoshop and Acrobat. One of our worst headaches was making these really powerful codebases work on desktop, web, mobile, and the cloud without having to completely rewrite them. For example, to get Lightroom and Photoshop working on the web we took a winding path through JavaScript, Google’s PNaCl, asm.js, and finally WebAssembly, all while having to rethink our GPU architecture around these devices. We even had to get single-threaded builds working and rebuild the UI around Web Components. Today the web builds work great, but it was a decade-long journey to get there!

The graphics stack continues to be one of the biggest bottlenecks in portability. One day I realized that WebAssembly (Wasm) actually held the solution to the madness. It’s runnable anywhere, embeddable into anything, and performant enough for real-time graphics. So I quit my job and dove into the adventure of creating a portable, embeddable WASM-based graphics framework from the ground up: high-level enough for app developers to easily make whatever graphics they want, and low-level enough to take full advantage of the GPU and everything else needed for a high-performance application.

I call it Renderlet to emphasize the embeddable aspect — you can make self-contained graphics modules that do just what you want, connect them together, and make them run on anything or in anything with trivial interop.

If you think of how Unity made it easy for devs to build cross-platform games, the idea is to do the same thing for all visual applications.

Somewhere along the way I got into YC as a solo founder (!) but mostly I’ve been heads-down building this thing for the last 6 months. It’s not quite ready for an open alpha release, but it’s close—close enough that I’m ready to write about it, show it off, and start getting feedback. This is the thing I dreamed of as an application developer, and I want to know what you think!

When Rive open-sourced their 2D vector engine and made a splash on HN a couple weeks ago (https://news.ycombinator.com/item?id=39766893), I was intrigued. Rive’s renderer is built as a higher-level 2D API similar to SVG, whereas the Wander renderer (the open-source runtime part of Renderlet) exposes a lower-level 3D API over the GPU. Could Renderlet use its GPU backend to run the Rive Renderer library, enabling any 3D app to have a 2D vector backend? Yes it can - I implemented it!

You can see it working here: https://vimeo.com/929416955 and there’s a deep technical dive here: https://github.com/renderlet/wander/wiki/Using-renderlet-wit.... The code for my runtime Wasm Renderer (a.k.a. Wander) is here: https://github.com/renderlet/wander.

I’ll come back and do a proper Show HN or Launch HN when the compiler is ready for anyone to use and I have the integration working on all platforms, but I hope this is interesting enough to take a look at now. I want to hear what you think of this!

Show context
iFire ◴[] No.39910485[source]
We've been doing work in Godot Engine trying to get wasm working.

How did you overcome the shared array buffer accessibility problem on safari vs access to ad networks which is important for online games?

I called it single threads vs regular builds.

Hope to help make sure there's a diverse set of rendering kernels for everyone.

Edited: Link to our work at making portable 3d graphics on the web with an editor. https://editor.godotengine.org/releases/latest/

replies(3): >>39910550 #>>39910769 #>>39911706 #
1. spxneo ◴[] No.39911706[source]
whew game engine running on WASM + WebGPU would finally be what it takes to power browser based AAA titles. We shouldn't have to download executables via garden walled ecosystems that take a huge chunk of devs revenues
replies(5): >>39911763 #>>39911826 #>>39912416 #>>39920966 #>>39921077 #
2. seanisom ◴[] No.39911763[source]
This right here. The web is the OS of the future - the standards are getting there, the tools are just starting to catch up.
replies(1): >>39913537 #
3. jasonjmcghee ◴[] No.39911826[source]
Can't https://bevyengine.org/ do this?

AFAIK https://wgpu.rs/ makes this possible with Rust.

---

But this is very different than what was demonstrated in the vimeo video.

replies(1): >>39913264 #
4. jms55 ◴[] No.39912416[source]
I don't see WASM/WebGPU changing anything when it comes to gaming, as an industry, personally. 3d visualizations and interactive websites? Yeah definitely a nice improvement over WebGL 2, if years late. The OP's experience with Adobe is a great example of this.

WebGPU is pretty far behind what AAA games are using even as of 6 years ago. There's extra overhead and security in the WebGPU spec that AAA games do not want. Browsers do not lend themselves to downloading 300gb of assets.

Additionally, indie devs aren't using Steam for the technical capabilities. It's purely about marketshare. Video games are a highly saturated market. The users are all on Steam, getting their recommendations from Steam, and buying games in Steam sales. Hence all the indie developers publish to Steam. I don't see a web browser being appealing as a platform, because there's no way for developers to advertise to users.

That's also only indie games. AAA games use their own launchers, because they don't _need_ the discoverability from being on Steam. So they don't, and avoid the fees. If anything users _want_ the Steam monopoly, because they like the platform, and hate the walled garden launchers from AAA companies.

EDIT: As a concrete example of the type of problem's WASM for games face, see this issue we discovered (can't unload memory after you've loaded it, meaning you can never save memory by dropping the asset data after uploading assets to the GPU, unless you load your assets in a very specific, otherwise suboptimal sequence): https://github.com/bevyengine/bevy/issues/12057#issuecomment...

(I work on high end rendering features for the Bevy game engine https://bevyengine.org, and have extensive experience with WebGPU)

replies(5): >>39912832 #>>39913531 #>>39914919 #>>39915618 #>>39916589 #
5. seanisom ◴[] No.39912832[source]
Lots of interesting points in there, and working on Bevy I'm sure you have much more extensive WebGPU expertise than me.

I agree that the feature set around WebGPU is constrained and becoming outdated tech compared to native platforms. It shouldn't have taken this long just to get compute shaders into a browser, but here we are. The lack of programmable mesh pipelines is a barrier for a lot of games, and I know that's just the beginning.

For memory, architecturally, that's why I'm treating wander as a tree of nodes, each containing Wasm functions - everything gets its own stack, and there is a strategy to manage Store sizes in wasmtime. Deleting that is the only way to free memory vs a singular application compiled to Wasm with one stack/heap/etc. More of a data-driven visualization framework than a full engine like Bevy, which I still think is one of the most elegant ways to build browser based games and 3d environments.

replies(1): >>39914956 #
6. Animats ◴[] No.39913264[source]
Not all that different. See these WGPU demos.[1]

As someone who's been using the Rend3/WGPU/Vulkan stack for over three years, I'd like to see some of these renderer projects ship something close to a finished product. We have too many half-finished back ends. I encourage people who want to write engines to get behind one of the existing projects and push.

[1] https://wgpu.rs/examples/

replies(1): >>39913426 #
7. jasonjmcghee ◴[] No.39913426{3}[source]
My understanding of the project here (Renderlet) was it allowed direct embedding in other non-wasm projects, which I didn't fully wrap my head around, allowing for injecting this engine inside of others? Or something to that effect?

Which is quite different than a renderer that targets wasm/webgpu. I think super highly of, and have used wgpu a fair amount.

I just interpreted Renderlet to have different goals.

replies(1): >>39913463 #
8. seanisom ◴[] No.39913463{4}[source]
That's exactly it. With renderlet, the goal is to compile the "frontend" code that's driving the rendering pipeline to WebAssembly, and provide a runtime that embeds that in any app, with the host app providing any configuration necessary to connect renderlet modules and use its canvas.

On the "backend", we will switch fully to wgpu as we retool around wasi-webgpu. I explicitly don't want to rebuild a project like wgpu, and everybody should commit upstream to that - we will likely have stuff to upstream as well.

9. PaulDavisThe1st ◴[] No.39913531[source]
Consider also the dramatic ... ahem ... success of the attempt to launch zero-day test versions of games via essentially VNC-via-java-in-the-browser.

AFAICT (I was peripherally involved with one of the companies that did this work), this really went nowhere, even though it offered "play this new game from any java-equipped browser".

10. PaulDavisThe1st ◴[] No.39913537[source]
What platform(s) do you think browsers will run on?
replies(1): >>39913756 #
11. seanisom ◴[] No.39913756{3}[source]
More of a comment on how apps are being built in the future - web-first is becoming the default.

I already see web even taking over in things like embedded UIs where native toolkits like QT historically were popular.

12. pjmlp ◴[] No.39914919[source]
I fully agree with you, hence why most game studios on the Web rather use streaming from hardware where those GPU capabilities are fully available than with constrained browser APIs.

WebGL and WebGPU are mostly fine for visualization and ecommerce, and that is about it.

Ah, and shadertoy like demos as well, probably their biggest use case.

13. pjmlp ◴[] No.39914956{3}[source]
It should be noted that the reason we don't have compute shaders on WebGL was Chrome team dropping the ball on them.

https://github.com/9ballsyndrome/WebGL_Compute_shader/issues...

https://www.khronos.org/webgl/public-mailing-list/public_web...

https://issues.chromium.org/issues/40150444

14. ◴[] No.39915618[source]
15. Terretta ◴[] No.39916589[source]
> The users are all on Steam, getting their recommendations from Steam, and buying games in Steam sales. Hence all the indie developers publish to Steam.

Which is how Steam charges 30%. Devs yell at Apple because they can say Apple is overcharging because of its "monopoly", they can't blame the monopoly on Steam.

With Steam, devs recognize that retailers get paid for shelf space, both as a percentage of 'retail price' the buyer pays above wholesale, and as literal payments for shelf space, inclusion in weekly mailings, posters on the windows, and more.

That these models worked like this long before digital distribution, and still work like this on platforms with no technical barrier to creating competing stores, gets ignored.

replies(2): >>39916714 #>>39918803 #
16. pjmlp ◴[] No.39916714{3}[source]
Many of those devs never targeted J2ME, Symbian, Blackberry, Windows CE/PocketPC telecom operator stores, where up to 80% was normal.

There are many reasons to complain, but 30% surely isn't it, as much as they make it to be.

replies(1): >>39921897 #
17. soulbadguy ◴[] No.39918803{3}[source]
> Apple is overcharging because of its "monopoly", they can't blame the monopoly on Steam.

But that's the core the issue. In one case (steam) the developers pay 30% because they estimate the services they are getting from steam are worth it, in apple case the devs. pay because they have to.

The problem is not with the business model or the % cut apple takes, the problem is that the business relies on monopolistic behavior. The solution would be simple, decouple IOS the platform from the app store the service. If the apple store is really worth a 30% cut the market would re converge to that price.

> With Steam, devs recognize that retailers get paid for shelf space, both as a percentage of 'retail price' the buyer pays above wholesale, and as literal payments for shelf space, inclusion in weekly mailings, posters on the windows, and more.

> That these models worked like this long before digital distribution, and still work like this on platforms with no technical barrier to creating competing stores, gets ignored.

I would argue that digital distribution and platform are fundamentally different to brick and mortal retailers.

For one, the marginal cost of an app on the store vs space on the shelves is different. My understanding was that what actually drives the cost of shelve space is competition between product manufacturer and the price setting is closer to an auction as opposed to a set price. Nobody would have an issue if all apple was doing was selling promotion/ads spot on the app store.

Also apple shares on digital distribution is much larger than any single retails chain in the US. Thus giving them extreme pricing power.

18. MenhirMike ◴[] No.39920966[source]
We already have that ability, both Unity and Unreal can run in the browser (though it looks like Unreal moved their HTML5 stuff into a public plugin). I think Godot also works if you don't use C# and stick to GDScript, or use Godot 3.x instead of the current 4.x.

The problem isn't the tech to run the game, it's the marketplace - how do you actually sell the games without losing the huge customer base that buys through Steam and platform-specific stores? If you're popular enough you probably still get a lot of customers, but I doubt it's anywhere near what Steam does for you.

Oh, piracy and anti-cheat are also a problem, because you just can't have a AAA game without Denuvo and Kernel Backdoors anymore (greeting to the Apex Legends players out there!).

There are probably still a few issues that would have to be solved on the game engine side, but I'm willing to say that the game engine is not the problem with browser-based games.

19. astlouis44 ◴[] No.39921077[source]
Here's links to Unreal Engine 5 running in the browser, for anyone interested:

https://news.ycombinator.com/item?id=39920890

https://simplystream.com/demos

20. talldayo ◴[] No.39921897{4}[source]
taps the sign

It's Not The 30% Fee That Makes People Angry, Rather The Lack Of Competing Alternatives Holding Said Fee Accountable