New games every week!
JSE - Delving Deep into WASM Blog
23rd September 2021
I started looking into WASM again, last night.

-=-=-

It's been a while since I did, mostly because using Emscripten makes me want to punch myself.
But last night I found this tutorial series.
Although it's kinda messy and jumps from tool to tool, including (aargh!) Emscripten, it does at least have a few snippets where the author ISN'T using Emscripten to do the job, and is instead using an online compiler tool, resulting in MUCH smaller, easier to manage files.

I was able to get a couple of test functions to compile and be functional in the browser, which is a much better result than previous attempts. Now I need to figure out exactly how to make use of it in an optimal way.

I don't think I can jump back to Javascript from WASM... That is, I don't think I can do things like "DrawImage" using the WASM, because the WASM would need access to Javascript's draw commands to do it.
But I might be able to get WASM to handle all the maths involved in scaling the sprite positions and such.

That'll require a heck of a lot of jumping back and forth between javascript and wasm, and I'm not entirely convinced that that would be any quicker. Plus, can it access the memory properly?! Hmmm..

But it's something to try out, right?!
Views 97, Upvotes 16  
Daily Blog , Jse , Wasm
New games every week!
Site credits : All of the above : Jayenkai
(c) Jayenkai 2023 and onwards, RSS feed 5

Blog - JSE - Delving Deep into WASM - AGameAWeek