4 ms·
Will there be support for building for HTML5/WebGL?
by 10000truths 5y ago
Will there be support for building for HTML5/WebGL?
- XCSme 5y agoNative support for this would be good, but I think you can already compile most desktop apps to HTML5/WebGL using WebAssembly.
- 10000truths 5y agoWebAssembly alone is not enough, you need access to the canvas and WebGL JavaScript APIs in order to actually perform the rendering. WASI may change this in the future, but for now, it means that integration with the emscripten toolchain is a must.
- XCSme 5y agoYes, I was referring to compilation using emscripten, but I couldn't remember the name, thank you!
- flohofwoe 5y agoFor a big engine like this there's a lot more work involved then cross-compiling the code to WASM. All lower-level parts that sit on top of OS APIs like IO, 3D-rendering, audio, networking, etc... need to be ported over, and the browser is a very different runtime environment than native OS APIs, so sometimes it's not even possible without a lot of compromises which may "drag down" other parts of the engine.
- XCSme 5y agoHmm, I was under the impression that there already are tools that automatically convert system API calls (IO, audio, networking) to web-compatible APIs.
- cachvico 5y agoConsider for example that TCP sockets are not available in the browser. There are other protocols available, but no simple TCP sockets. So you can see there are fundamental differences there that cannot simply be abstracted over.
- astlouis44 5y agoOur startup is working on it!
- gfxgirl 5y agoI have the opinion that the needs of web based games is fairly different than native games and that it's unlikely any game engine targeting native games is going to do a good job with for web games. Native games, downloading 50meg to 50gig is before you can play is not uncommon. Web games you probably want to keep under 1-2meg (just a guess). Of course you can try to use an engine designed to make native games but use small resources but, AFAICT, most of those engines, just their code, is already too large to really be a web game. I know Unity was trying to make a smaller runtime for web games but since shipping a few demos a few years ago I haven't heard much about it.
- pjmlp 5y agoYou are better using something like BabylonJS or PlayCanvas, designed from scratch to target the Web within the constraints of WebGL.