Live data from Hacker News

Running WASI binaries from your HTML using Web Components

runno.dev

51–60 of 73 posts

Re: Running WASI binaries from your HTML using Web Components

#51
post #32
post #29

Earlier quoted context omitted.

That expectation is off by nearly a decade. WASM games in terms of performance are closer to 2000 than 2010. Here's an open source indie game from 2003 that I ported to WASM [1]. It struggles to hit 60 FPS on devices that were released a good 15 years after the game itself. Browsers sometimes struggle to animate simple lines at 60 FPS still to this day, because they're just hugely massive platforms with thousands of…

If we hadn't lost a decade with what Flash and PNACL already offered us in 2011... No wonder studios rather bet on streaming than a tech that will never deliver.

PNaCl was a joke though, it suffered from much longer client-side compilation times than both asm.js and WASM ever had, and performance was at most on par with asm.js.

(NaCl was better in those areas, but required to stamp out one binary for each target CPU architecture)

Re: Running WASI binaries from your HTML using Web Components

#52
post #27

Very slick and opens up so many possibilities. WebAssembly, WASI, like WebRTC/WebGPU/WebXR/WebAudio, just makes webdev, gamedev + native/networking very very interesting in this phase of technology where js frameworks are culty bloated/verbose and apps are the main thing for marketing/tools. Web apps + tools are opening up with wasm/wasi. Runno ( https://runno.dev/ + https://runno.dev/wasi ) is a great idea and helps…

Yet I am still waiting to see a game with the same capabilities of Infinity Blade, that Apple used in 2011, as an example of a game showing of the newly acquired OpenGL ES 3.0 capabilities of iDevices. Or the Unreal Engine 3.0 citadel demo, also in 2011, for Flash/CrossBridge. It seems the only thing usable is running ShaderToy demos, and 3D views on ecommerce sites.

These are mostly business issues. If the business problems would be solved, the games would be built, despite any technical limitations of the web platform (which are not much different than limitations on low-end Android mobile devices).

Nobody has figured out so far how to make money with high quality games on the "open web" to get the same return on investment like simple ad-driven 2D games running on closed platforms like Facebook which can technically be cobbled together by 3 dudes in their mom's basemement (exaggerating a bit here of course).

E.g. no matter how you approach it, the Citadel demo wouldn't have led to a web game that would make the same profit relative to the development cost like a simple ad-driven Tetris style game.

Re: Running WASI binaries from your HTML using Web Components

#53
post #49

Earlier quoted context omitted.

Let's be clear what Flash was though. It was a native binary that would paint to a region owned by the browser. So yes, it was performant because basically the only thing it was doing differently than any other native application was how it was hosted by the browser. That's also why it was such a security nightmare. It was a complete escape from the browser sandbox.

It was a great development experience, destroyed by pitch forks and lanterns by the folks that a decade later have failed to deliver a sound alternative. Hence why the gaming industry is focusing on streaming instead.

Flash was destroyed by Apple, which had no interest in improving the web either. The iOS platform turned out to be a pretty good replacement for Flash though.

Re: Running WASI binaries from your HTML using Web Components

#55
post #54

Great stuff. Is it possible to output to markup from these programs ? It would be cool if python wsgi programs in this could work somehow.

Yeah of course! They've got STDIN/STDOUT/STDERR and I've built a Virtual Filesystem. But if you're using WASI binaries locally they don't have that restriction.

You might be interested in WAGI: https://github.com/deislabs/wagi

And to catch up on WASI: https://xeiaso.net/talks/unix-philosophy-logical-extreme-was...

Re: Running WASI binaries from your HTML using Web Components

#56
post #49

Earlier quoted context omitted.

It was a great development experience, destroyed by pitch forks and lanterns by the folks that a decade later have failed to deliver a sound alternative. Hence why the gaming industry is focusing on streaming instead.

Flash was destroyed by Apple, which had no interest in improving the web either. The iOS platform turned out to be a pretty good replacement for Flash though.

Apparently people keep forgetting that after that memo, Adobe produced an AOT compiler for Flash, targeting iOS.

Re: Running WASI binaries from your HTML using Web Components

#57
post #32

Earlier quoted context omitted.

If we hadn't lost a decade with what Flash and PNACL already offered us in 2011... No wonder studios rather bet on streaming than a tech that will never deliver.

PNaCl was a joke though, it suffered from much longer client-side compilation times than both asm.js and WASM ever had, and performance was at most on par with asm.js. (NaCl was better in those areas, but required to stamp out one binary for each target CPU architecture)

A joke that was able to deliver more than WASM/WebGL have yet to deliver.

Re: Running WASI binaries from your HTML using Web Components

#58
post #29
post #27

Earlier quoted context omitted.

Yet I am still waiting to see a game with the same capabilities of Infinity Blade, that Apple used in 2011, as an example of a game showing of the newly acquired OpenGL ES 3.0 capabilities of iDevices. Or the Unreal Engine 3.0 citadel demo, also in 2011, for Flash/CrossBridge. It seems the only thing usable is running ShaderToy demos, and 3D views on ecommerce sites.

That expectation is off by nearly a decade. WASM games in terms of performance are closer to 2000 than 2010. Here's an open source indie game from 2003 that I ported to WASM [1]. It struggles to hit 60 FPS on devices that were released a good 15 years after the game itself. Browsers sometimes struggle to animate simple lines at 60 FPS still to this day, because they're just hugely massive platforms with thousands of…

There's definitely something strange going on here. I'm getting about 3x as much CPU load on the WASM version as compared to native. Still low enough for a solid 144fps on my machine, but there shouldn't be this much overhead.

Re: Running WASI binaries from your HTML using Web Components

#59
post #27

Earlier quoted context omitted.

Yet I am still waiting to see a game with the same capabilities of Infinity Blade, that Apple used in 2011, as an example of a game showing of the newly acquired OpenGL ES 3.0 capabilities of iDevices. Or the Unreal Engine 3.0 citadel demo, also in 2011, for Flash/CrossBridge. It seems the only thing usable is running ShaderToy demos, and 3D views on ecommerce sites.

These are mostly business issues. If the business problems would be solved, the games would be built, despite any technical limitations of the web platform (which are not much different than limitations on low-end Android mobile devices). Nobody has figured out so far how to make money with high quality games on the "open web" to get the same return on investment like simple ad-driven 2D games running on closed platf…

No they aren't, at least low end Android devices support GL ES 3.2 and have proper debugging tools.

After a decade Web 3D keeps having spectorJS as the only alternative.

Naturally there are also some masochists that enjoy debugging the browser 3D stack on RenderDoc, while trying to figure out what belongs to their application.

Post reply on HN