Live data from Hacker News

Running WASI binaries from your HTML using Web Components

runno.dev

31–40 of 73 posts

Re: Running WASI binaries from your HTML using Web Components

#31
post #2

G’day, if anyone has any questions about this I’m happy to answer them here.

Would it be practical to output HTML from these WASI components and build a page from them?

I wouldn't put it in prod, but it would be possible. You'd need a JS binding layer that dealt with the output and wrote it to the page, but it could be minimal.

There are other projects that are targeted more at this kind of thing if you want dynamic access to the DOM from Web Assembly (sorry I don't know them off the top of my head).

Re: Running WASI binaries from your HTML using Web Components

#32
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…

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.

Re: Running WASI binaries from your HTML using Web Components

#33
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…

I need to double check what you're saying, how do you show the FPS in your WASM port?

Re: Running WASI binaries from your HTML using Web Components

#34
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…

A browser also has the baked in expectation of you interacting with hypertext.

A video game of this caliber you are discussing is typically entitled to:

- have a dowload and installation process that might span over say 20min or more

- load slowly, because it needs to push a ton of assets through

- demand a ton of resources such CPU, GPU, threads, memory etc. to achieve amazing graphics and simulation

- being the primary foreground process or possibly the only one

None of these things apply to the typical web. Quite the contrary: most web devs would get fired or ridiculed if they demanded these resources.

So I assume that browsers optimize for the typical usage, which is hypertext.

Re: Running WASI binaries from your HTML using Web Components

#35
post #33
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…

I need to double check what you're saying, how do you show the FPS in your WASM port?

Devtools or F9 while in game. Type a famous magic word in the title screen to access all levels. Not sure how to do this on a phone which is what I was referring to - but framedrops are pretty obvious.

Re: Running WASI binaries from your HTML using Web Components

#36
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.

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.

Re: Running WASI binaries from your HTML using Web Components

#37
post #6
post #5

website not loading for me

It's a bit temperamental on some browsers sorry (I've seen it fail on Arc). I implemented my own front-end router and I have done a bad job. I've seen it work today on Chrome, Firefox and Safari.

Why is it temperamental? When you say frontend router do you mean in the SPA sense (eg, React/Angular) or do you mean like your own load balancer (eg ALB/HaProxy/Nginx)?

(Not working in Firefox for me)

Re: Running WASI binaries from your HTML using Web Components

#38
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.

The unreal citadel demo was running in a browser without flash in 2014: https://blog.mozilla.org/en/mozilla/mozilla-and-epic-preview...

Re: Running WASI binaries from your HTML using Web Components

#39
post #35
post #33

Earlier quoted context omitted.

I need to double check what you're saying, how do you show the FPS in your WASM port?

Devtools or F9 while in game. Type a famous magic word in the title screen to access all levels. Not sure how to do this on a phone which is what I was referring to - but framedrops are pretty obvious.

Thanks, I suspect it might be gl4es but I need to find my old phone to investigate. Magic word is "xyzzy" for anyone else looking.

Re: Running WASI binaries from your HTML using Web Components

#40
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.

Apple has been slowing down WebGL I think. See eg people complaining in https://developer.apple.com/forums/thread/696821 and https://discourse.threejs.org/t/horrible-3d-three-js-perform...
Post reply on HN