Some sort of systemic corruption in corporate culture must have emerged at least around the time when Personell was renamed to "Human Resources". I mean, think about it for a second, if you were to hire some people to help you with something, would you unironically call them "human resource"? Even if you might think about them in private as easily replaceable and therefore not of much value, would you go ahead and call them "human resource" to their face without feeling weird at all?
This is actually written in C++ and I compile it to a native executable during development, and yet it crawls to a stop exactly the same, so I'm afraid that that one's on me. :D
(It's an inefficiency related to the breakage particles and waits patiently on a big pile of other code TODOs at the moment.)
Nevertheless, I don't disagree with you on your general sentiment towards browser games, I like fast native executables as well.
Yeah, I'm aware of this error, it seems to be related to the shared hosting I'm using, I can't replicate it when serving locally. But as long as it is "falling back to ArrayBuffer instantiation" all is good, and I didn't investigate further because this fallback mechanism actually loads the WASM module faster than the "streaming compile" method (these things are provided by Emscripten).
I have no idea why it didn't load on the first try for you though.
Thanks for the feedback, using the phone's accelerometer is actually a great idea!
As others mentioned, there are web APIs for that these days, I'll try to include something like that in the next version.
This web app is a different take on the typical hex editor/viewer tool.
Using this graymap visualization you can easily get a quick overview over binary data and spot interesting structures.
One good example to try out is the Windows Media Creation Tool (MediaCreationTool21H2.exe).
If you throw that in you'll quickly see that almost half the data of the 18 MB executable consists of uncompressed bitmaps, which seems kinda wasteful.
Very cool hack indeed!
One thing I learned from this is that having an HDMI port gives you a free I2C port on top as well, as long as you have an old HDMI cable lying around to cut open.
Small note on using these OLEDs with 5V:
Typically they expect 3.3V Vcc and logic levels, although almost all of them seem to work just fine with 5V. In my experiments with a regular 5V Arduino some OLED modules made weird coil whining noises, I presume this is from the charge pump circuitry. Driving them with 3.3V as specified removed the coil whine completely.
Reading this article motivated me to take a closer look at printf/iostreams alternatives, and I have to say, the mentioned {fmt} library finally made me switch, so thanks for that!
WebAssembly has no access to the outside world at the moment, that is correct. It is only able to call (and be called by) JS.
A C++ application compiled via Emscripten ships (a fairly large amount) of JS glue code that exposes all relevant Browser APIs like WebGL, Fetch or other HTML5 stuff to the actual WASM program.
As others commented, for WebGL an additional API translation is applied. If the source targets OpenGL ES 2 (or 3 for WebGL 2), this step has almost no overhead however.
Slightly off-topic, but still anecdotal how far CGI has come, I recently showed my dad who hasn't played any video games for at least 20 years this [0] video of the current MS Flight Simulator. It is produced in a documentary style, so there are no real cues to it being a game. After watching it together, my dad said: "Yeah that's a nice documentary about this difficult airport, but I thought you wanted to show me that new game?".
You can imagine his face when I told him that we've in fact watched just that.
Outrageous, this can't be!
But seriously, it is saddening sometimes to see so much mindshare and engagement wasted on poorly thought out "solutions" to whatever issue is currently trending on Twitter. Even worse, the constant social media outrage machine seems to reduce the inherent kindness that most people have in them (before discovering Twitter).
Upcoming versions of Google Docs will use canvas based rendering [0], and I presume their custom renderer might be compiled to WebAssembly.
WASM and Canvas (potentially using WebGL) are definitely an interesting combination right now.
Silly physics fun in the browser, but not a complete game (yet).