Things that don’t work in the build:
- There is a small audio delay
The overall process invoked using Emscripten to compile the engine C source code into a wasm/js runtime. Here’s a quick overview of the steps involved porting the code base to Emscripten:
- Remove threaded code
- Ensure 32bit build works
- Ensure static build works (except for libraries provided by emscripten)
- Use gl4es library that translates/maps the OpenGL calls to OpenGL ES.
- Replace the infinite main loop with function to be called at the desired FPS from emscripten (emscripten_set_main_loop(..))