BGE games/Blender in a browser via straightforward conversion? Mozilla has a plan.

http://kripken.github.io/emscripten-site/index.html

The goal of the Emscription project is a software that will essentially allow a developer to take any project written in native C/C++ code and convert it to a highly optimized java-based format that will not only allow it to be run in the browser, but run with a very low speed penalty compared to the unconverted version.

A possible application for this would be to create a browser-based version of the Blenderplayer, allowing people to play BGE games on the web without requiring a massive undertaking by the developers.

I’m not really sure at the moment how this will handle dependencies, but the very idea at least of making it easy for every game engine dev. team in existence to add browser support is unprecedented in the world of web development.

In light of this, could this possibly be the beginning of the end of actually having to install most software outside of a web browser?

Java != javascript :wink:

As already mentioned, it is JavaScript and not Java. More precisely it is asm.js which is a subset of JavaScript.

Sorry for the long post :slight_smile:

There is definitely a lot of potential, however the technology is still very new and work needs to be done at many places. First asm.js doesn’t have everything that is needed to allow C/C++ performance for everything. E.g. SIMD support is just being integrated, just like multi threading. It seems that the multi threading part is going to be a little special, which will require lots of work to be done in emscripten in order to translate all types of multi threaded code, if it is even possible. Just to clarify it, emscripten is not able to convert all C/C++ code into JavaScript, there are many restrictions.
Further all that code needs to be downloaded, compiled and executed on the end user’s machine within a browser. The code size is enormous and the download times long, though they are working on that too. For the compilation the whole source code needs to be loaded and translated into machine code within a browser. This requires a huge amount of RAM. The worst thing about it is that this depends on the actual browser. At the moment Chrome uses more memory for the compilation than Firefox, but all browser vendors are working on improvements.
All that is just to execute code. The visuals are handled with WebGL which is kind of okay to work with, but is definitely not state of the art anymore. That’s why WebGL 2 is on the way. However, it still takes time until it is available in all browsers.

Contrary to what you wrote, I believe it would require a massive undertaking from the developers and it would very likely require lots of maintenance work over time due to the enormous development speed of the involved external packages (emscripten, asm.js, WebGL, browsers).

Yes, it could, but I don’t think so.

In order for this to be optimised and useful, I don’t think it’s possible within a browser. A better try is maybe what octane were thinking, by doing on the computation server side and streaming to the client, but bandwidth would seem to be an issue.

This way it doesn’t matter about the host machine, web browsers, or ram, essentially it works like a dumb terminal.

Doesn’t really fix the real problem with BGE, targeting. But,. maybe it helps to be able to have it run in WebGL for mobile platforms.

All the issues I mentioned are being worked on. At least most of them are just a matter of time and they seem to be pushing it very much.