Game development tools: Babylon.js

Jun 04, 2019 at 02:47 pm by nemirc

Babylon.js

There are different game development engines out there, and I've covered some of those in the past. Babylon.js is not like those engines, because it can be tested directly within your internet browser, or deployed on your computer.

One thing I need to mention is that Babylon.js also works differently, because it's pretty much code-based (it uses Javascript).

You don't have a level editor or extensive drag and drop features, a viewport, etc. Everything (or almost everything) you do in Babylon.js must be done by writing code, and I have to admit that is going to turn off a lot of people (me included).

The engine is based on WebGL, and that means it supports a wide variety of features. For those who don't know, WebGL is a web standard, designed by Khronos Group, for 3D graphics that is meant to allow the rendering of 2D and 3D graphics within any web browser without the need of plugins.

The idea, as you guess, is that you don't need to install any third party application to run games on your browser, something that has always been an issue for games made in Flash or older versions of Unity.

The Babylon.js gives you access to the Playground, a site where you can test the engine for yourself and see the different things the engine is capable of.

As an animation guy, the first thing I checked was the animation features. Just like major engines, Babylon supports rigged meshes that can be animated, and also animation blending, meaning your characters can smoothly switch from one animation to the next without any problem. You can control how much animations blend, or how long they take, and also combine animations with ease.

Imagine your best photo ever

One of the most things that get more attention are the rendering features, and that's not a surprise considering the first thing gamers see in a game are the graphics.

WebGL is capable of producing really nice graphics using a PBR (physically based rendering) engine. This rendering technology has become prevalent in all game engines because it produces very realistic results.

On the other hand, it also supports advanced rendering features like fur, as seen in the following image. Having tested this engine in 4K, I have to admit the fur looked a little underwhelming, but I think fur rendering technology hasn't reached a point where it can yield good results. After all, we are barely getting hair to look right.

Babylon.js also has support for audio, including spatial audio. What this means is that the audio source is heard louder/softer depending on the distance, and also it will come from the right direction.

Unfortunately, there's not many examples that show you what you can do with the audio, and it seems audio is commonly relegated to the back of the priority list.

As you know, I am not an audio person, but I know what good audio can do for games, and while other engines offer ways to modulate or change the way audio is perceived (for example, simulating a big void environment), Babylon.js right now offers really basic functionality.

Another nice feature is its particle generator. The engine's particle systems can produce really nice results.

The engine has a basic inspector where you can change parameters and see the hierarchy in your scene, and that can be useful in some situations, for example, in case you want to change some material parameters.

Other features of the engine include cloth simulation, rigid bodies, and the ability to create VR content.

I am not much into VR, and I don't have a VR headset, so I can't really tell you how VR would work in a web-based game.

The cloth simulation is very capable, but I have to admit it's not impressive, since colliders poke through the cloth and the simulation in general feels very rough. This should improve as WebGL gets better, though.

One thing to note is that, even if WebGL supports both 2D and 3D graphics, Babylon.js is built as a 3D engine, meaning you can only make web-based 3D games.

If you are into 3D game development for web, and are familiar with Javascript, maybe you can give Babylon.js a look.

However, if you are already using another engine for your web-based games, and are not so familiar with that programming language, Babylon.js may be out of your scope.




Sign up for our newsletter

This website uses cookies to ensure you get the best experience possible More Info
Got it!