Babylon.js: JS framework for building 3D games with HTML5 and WebGL
blogs.msdn.com
blogs.msdn.com
On the down-side they do not appear to have implemented 3d animation yet. Assuming we can go from animated FBX to Babylon fairly seamlessly, this starts to look pretty useful.
The next thing would be a halfway decent positional sound library.
Cannon.js is a promising physics engine[3].
Nonetheless, it is exciting to see Microsoft not only supporting WebGL, but also promiting open source libraries to ease development on the platform.
[1] https://github.com/danielribeiro/three-hub
Collada support is a lot more impressive, but FBX support -- even though FBX is proprietary -- is much more useful given the wider and broader support for FBX out there (even Blender can export to FBX).
Plus we have a level designer, physics engine, scripting API, hosted publishing, and a halfway decent positional sound library :-)
You can see importing models and animations in action here http://www.youtube.com/watch?v=qy_fRcV-3wk, or signup for yourself [http://playcanvas.com]
Chrome handles these samples very well, except for one thing which I think would be a major distraction for games: there's a ~1/sec stutter, which I assume is a GC pause. Google touts their stop-the-world GC as being ultra efficient and accurate, and in many ways it is. But I'm not sure that STW is an appropriate approach for games.
The stutter has improved in recent updates, but it's still there. I wonder if they'll consider an alternative GC approach for situations involving continuous rendering.
I wonder how webgl will perform on the predominant browser platform - mobile.
BABYLON.Vector3.prototype.add = function (otherVector) {
return new BABYLON.Vector3(this.x + otherVector.x, this.y + otherVector.y, this.z + otherVector.z);
};
I do a lot of WebGL work and I'm constantly fretting about avoiding allocations. For instance, compare to gl-matrix's operator: vec3.add = function(out, a, b) {
out[0] = a[0] + b[0];
out[1] = a[1] + b[1];
out[2] = a[2] + b[2];
return out;
};
A little more awkward, but you're only allocating the vector once and then modifying in place wherever possible. THREE.js takes as similar approach with THREE.Vector3.Three has well over 2 years of rock-solid improvements under its belt, from hardcore graphics programmers to boot.
Three is not a fully fledged game engine, it's "only" providing a reasonably easy to use, sane 3D graphics engine to run on, which raw WebGL is decidedly not.
So any JS "game engine" project would do well to build on three.js (to pick up their many performance and other improvements from the last 2-3 years and those that the community will keep producing over the years to come) and then on top of that provide actual, non-rendering related "game engine" features akin to Unity3D. Objects management, component system, triggers, events, usable input management abstractions, materials management, LOD systems, configurable shadowing/lighting setups (on top of the options provided by three+friends), pluggable post-fx shaders with a few out-of-box ones and easy custom shader integration etc etc etc.
For reference, at 60hz you have roughly 16.6ms to produce a frame and then do whatever you like before it's time to present it. So if the actual game code runs in a few milliseconds (not unreasonable for low to mid tier 3d games, even in the browser), you can do some incremental GC for 5-10ms and not be at risk of missing vsync. It's even better if you do the actual wait-for-vsync in a dedicated thread while you GC; then you won't ever miss vsync, and the vast majority of GC pauses are entirely hidden from the user.
You can see demos directly there.
As Babylon.JS, it's open source, mostly done on our free time and works well on every platforms supporting WebGL such as Chrome, Firefox, Opera, Android, Firefox OS and of course IE11 (win 8.1/RT).
I don't understand why people keep falling for this crap. Microsoft will do the best that it possibly can to disrupt WebGL with compatibility and other issues, just as it has always done with every key aspect of web technology. This li brary is the latest example. They could have easily made improvements to Three.js or some other existing library that was tested on other browsers but they did not. There are too many billions of dollars on the line. 3d gaming in the browser means the end of the Windows PC monopoly and Microsoft knows that whether the rest of you do or not. No I'm not exaggerating.
Where does it say this? Demos work fine in Chrome for me, at least.
Regarding the missing collisions: ThreeJS focuses on the 3D part of a game engine only. If you want collisions, you need to add a physic engine.
There's a couple of them out there - I would recommend CannonJS and there is a working ThreeJS FPS with WASD and collisions here: https://web3dblog.wordpress.com/2013/01/07/source-code-of-th...
BTW...Babylon.js works in all 3 of the major browsers, and performs best in Firefox, not IE10.
Syntax seems pretty similar, which is not terribly surprising.
This looks to have awesome potential. Well done!
Apple Mac OS X 10.7.5 Intel Chrome 28.0.1500.95
Thank you very much and please close the door when you leave the room.
How is this better than Flash/Flex/whatever Adobe has to play games? I mean waiting time is still there and I don't think Babylon.js works on all browsers the same (i.e. single code base for your game).
Second question: if I want to develop a game to be played on browsers AND mobile (iOS + Android) and I'm a single developer, isn't Adobe my best bet?
Adobe actually announced that they would be charging royalties on 3d games developed with flash. They backed off after developers pushed back, but it really shows the danger of using an Adobe owned platform.
http://www.forbes.com/sites/ericsavitz/2011/11/09/adobe-to-s...
"Flash Player 11.1 is the last release of the Flash Player plug-in for mobile browsers. Adobe will not add support for new mobile device configurations (chipset, browser, OS version, etc.). Adobe will continue to provide critical bug fixes and security updates for existing device configurations through September 2013, and will also allow our source-code licensees to continue working on and releasing their own implementations." http://www.adobe.com/devnet/flashplatform/whitepapers/roadma...
There is no future for Flash. Adobe's all about HTML5 now, they don't give a shit about Flash any more, and neither should you.
Unity3D went to great efforts to support Flash, and now they're sunsetting it, for good reason:
Unity wrote on their blog: http://blogs.unity3d.com/2013/04/23/sunsetting-flash/
We don’t see Adobe being firmly committed to the future development of Flash. This is evidenced by the cancellation of Flash Player Next, the instability of recent Flash Player versions and by Adobe’s workforce moving on to work on other projects.
By introducing, and then abandoning, a revenue sharing model, Adobe eroded developers’ (and our) trust in Flash as a dependable, continuously improving platform.
Developers are moving away from Flash, and while Flash publishing has gotten little traction, our own Unity Web Player has seen unprecedented growth in recent months (now installed on over 200M computers and already installed by 1/3 of all Facebook gamers).
According to the Free Software Foundation, it is a free software license but not compatible with the GNU GPL.
That doesn't mean much, the GPL (v3) is incompatible with itself (v2). Not a GPL hater, just pointing out that it's not a big deal for licenses to be incompatible with the GPL.
I don't see anything that says that this is a Microsoft product. It looks like a side project by a Microsoft employee. (full disclosure: I work at MS.)
> Not open source
Looks like the source code is available at https://github.com/BabylonJS/Babylon.js under the "Microsoft Public License" which has been certified by the Open Source Initiative as an open source license.
That was 20 years ago!
On the flip side, there's no reason to hate everything Microsoft do, c# and Mono are great. Maybe people should get over dismissing anything open source that Microsoft do, but the rest of what you've said makes no sense.
Microsoft didn't do Mono, it did .NET which Mono cloned in a form supported on a wider variety of platforms.
There's a lot of reason to not use MS technologies even if you do like MS.