Really cool project. Just tried on my Moto E 2nd gen with Chrome and it was smooth as butter. Are you storing images as svg inside the wasm blob? Seems like you're not batching draw calls? Was the Dart app not fast enough?
The 2D elements (menu buttons, background trees, etc...) enter the game's editor as SVG, where they get converted to an intermediate vector format that is optimized to be loaded and rendered fast. That intermediate format is what's inside the wasm blob.
Regarding draw calls, I could definitely batch more than I do. But the game is rarely draw-call-bound so I haven't had a reason to optimize that part of the graphics pipeline.
Dart is still used in the game's editor, which has been stable for a couple of years now. For the production engine, C++ just makes too much sense. It is what made this WebAssembly demo possible :)
Yes, it is a custom format. The paths are "triangulated" on the CPU once and the resulting triangles are uploaded to the GPU for subsequent draw calls.
Regarding draw calls, I could definitely batch more than I do. But the game is rarely draw-call-bound so I haven't had a reason to optimize that part of the graphics pipeline.
Dart is still used in the game's editor, which has been stable for a couple of years now. For the production engine, C++ just makes too much sense. It is what made this WebAssembly demo possible :)