Nice! With a BBC Micro (6502, 1MHz) I was able to achieve about the same FPS (I was genlocked for UK PAL TV transmission so either 25FPS or 50FPS) but only for a 40x25 grid, using 6502 assembler embedded in BASIC!
WebAssembly 101: A developer’s first steps
21–30 of 153 posts
Re: WebAssembly 101: A developer’s first steps
#22Re: WebAssembly 101: A developer’s first steps
#23Not very reassuring that two of the first steps are "copy and paste this stuff from stack overflow to make it work", without any explanation as to why it's needed.
Agreed. Setting up the environment with 0's seems like it should just be the sane default: 'env': { 'memoryBase': 0, 'tableBase': 0, 'memory': new WebAssembly.Memory({initial: 256}), 'table': new WebAssembly.Table({initial: 0, element: 'anyfunc'}) } But it is really early on and if the Portable updating SDK is any indication it seems like they want to make it easy to get started.
Re: WebAssembly 101: A developer’s first steps
#24Earlier quoted context omitted.
I'd be inclined to agree. Unless the point was not to show off, but that a 30 year-old computer is as fast as the bleeding edge in browser rendering technology.
Given that this [1] runs easily at solid 60fps on Chrome, a pure software rasterizer written in pure JavaScript with some basic optimizations, I'm pretty sure that webasm is can do at least as well. The Beeb is not capable of anything remotely like that. https://jsfiddle.net/Sharlin/9w26necy/52/
Re: WebAssembly 101: A developer’s first steps
#25I recommend anyone wanting to experiment with WASM to check out https://github.com/dcodeIO/webassembly which takes a lot of pain out of setting up the toolchain and lets you produce much leaner binaries as well. Also keep an eye on https://github.com/dcodeIO/AssemblyScript :)
Re: WebAssembly 101: A developer’s first steps
#26Nice! With a BBC Micro (6502, 1MHz) I was able to achieve about the same FPS (I was genlocked for UK PAL TV transmission so either 25FPS or 50FPS) but only for a 40x25 grid, using 6502 assembler embedded in BASIC!
Looks like the code is pretty slow. Lots of branches in the inner loop, like range check. https://github.com/blaze33/way-of-life/blob/master/src/js/wa...
Re: WebAssembly 101: A developer’s first steps
#27Earlier quoted context omitted.
Looks like the code is pretty slow. Lots of branches in the inner loop, like range check. https://github.com/blaze33/way-of-life/blob/master/src/js/wa...
I'll concede that I did not spend any time optimizing the C code, the focus was mainly on getting a working wasm module that integrated correctly with th js code. I'll probably have a look on this after work.
No point to benchmark "Hello, World!"s.
Re: WebAssembly 101: A developer’s first steps
#28Go to this link to test it out:
https://linuxontheweb.org/desk?desk_init=bHMgL3B1YjtvcGVuIEF...
The argument in the URL is the base64 encoding of an initialization script that is being passed to the desktop environment. Going to the link in current Edge should just open the "Arcade" app, with nothing else happening.
You should be able to drag-n-drop ".gb" or ".nes" ROM game files from your native desktop right onto the Arcade app window, and it should just start playing. You can also just drop them onto the web desktop to save them there, then just double-click them when you want to play. That way, the file is kept in the site's local storage.
Learn more about how to use the web-based OS here: https://www.youtube.com/channel/UCZkhPP7327fXcSsjD_lt67w
If anybody has wasm-capable Edge or Safari, let me know if you can play the game.
Re: WebAssembly 101: A developer’s first steps
#29It will end up being a tool of control and surveillance like always.
This guy says it a bit more eloquently than I can:
Re: WebAssembly 101: A developer’s first steps
#30I hope they add support for garbage collected languages soon. I don't feel like going back to work with malloc and free after 20 years.