I built HelioSim, a real-time N-body gravitational system simulator running directly in the browser via WebAssembly.
It’s written in C++ and uses OpenGL ES 3.0, GLFW, and Emscripten. The entire simulation and rendering pipeline runs in WebAssembly.
Features: - Real-time N-body gravitational simulation - Predictive orbit trails - Collision handling - Time controls (slow motion / fast-forward) - Dynamic body spawning
This was my first larger WebAssembly project, and I was honestly surprised how well modern browsers handle a C++ + OpenGL ES pipeline compiled to WASM.
One interesting challenge was bridging events and state between JavaScript and C++, which can honestly be a bit exhausting.
Source code:https://github.com/clemenskoprolin/heliosim
I’d love feedback on performance on other machines. Thanks!