BabylonJS – A JavaScript framework for building 3D games with HTML 5 and WebGL
github.com
github.com
Is there a reason that someone would use a Javascript engine like Babylon, Three or PlayCanvas over... say... just using UDK or Unity to make a WebGL game ???
My knowledge of Javascript engines other than Three does not go deep... so it's entirely possible that this is a dumb question. I'm just wondering though.
EDIT: Sorry .. I meant "PlayCanvas". Corrected.
--Unity requires a plugin be installed to play in a browser. http://unity3d.com/unity/multiplatform - scroll down to "UNITY FOR WEB": "Once a user installs it, the hugely popular Unity Web Player plugin updates automatically."
--The developers know Javascript (Unity's "Javascript" isn't really Javascript, it's "Unityscript").
Unity 5 introduces WebGL. However there are a few things that don't work in all major browsers
That, and the accessibility of the API vs. having to download and work in an IDE that you'll eventually have to pay money for mean more JS games.
Phaser.io[1] is a fairly comprehensive JS engine that is totally free. It's used to make professional games that run across a variety of devices.
[1]: http://phaser.io/
Is that fixed in 5.0?
Yes, there's plenty of reasons. First of all, babylon.js for instance, has been made specifically for the web. It's been tested on all browsers & on as much mobile devices as possible. Our shaders architecture has been made for that: to run on as much platforms as possible, mobile included. We're also spending a lot of time optimizing the performance for the web browsers and we're taking into account some of its specifics: offline via IDB, support for multi-touches (Touch & Pointer Events), streaming of assets, GC friendly, etc.
We have plenty of tools to help you testing the behavior of our engine and your code in the targeted env, the web: the sandbox tool, the debug layer, emitting user marks for F12 tools. We even have something we’re very proud of, our playground: http://www.babylonjs-playground.com/. Test & debug your code directly in the browser. Learn by experimenting in the target platform.
Moreover, babylon.js is free & open-source. You can debug your game and our engine directly in the browser. You can tune our engine to your needs if wanted as you have access to the source code, fork it and do whatever you want with it. You’ll also write the logic of your code in pure JS (or any great compiler like TypeScript or CofeeScript).
Babylon.js offers then a pure web experience. You can customize everything you want, handle the UI yourself with the ton of existing libraries, add some cool CSS features on top of it, mix it with SVG. Well, it is the web. Last but not least, we have almost finished our Unity exporter to Babylon.js that will dump all the graphics & sounds assets from the Unity scene to our .babylon format. It even seems much more efficient that the Unity 5 export.
Well, you see that this is a completely different philosophy. On the other hand, Unity 5 benefits from a huge community & assets. But creating a simple scene with a couple of meshes could take several minutes to export to WebGL and create up to 100MB of JS! And it's a very specific JS based on asm.js that can't be read by human nor modified. Plus it will only run correctly on Firefox (soon on Spartan too). At last, you will have to write the logic of your game in C#. But it’s a real great option for games developers that don’t master the beauty of the web. Unity is doing everything for them.
Conclusion: Unity 5 targets people with games already built for mobiles and will offer a very specific WebGL option. It's closed source. Babylon.js targets web games developers that build games specifically for this platform. It's free & open-source.
Note: I'm probably not objective as I'm the co-author of babylon.js ;) But I'm sharing my vision.
Our Web Audio engine runs fine in Chrome & Spartan.