Sign in to follow this  
hit2501

Babylon.js vs Unity - What makes BJS better?

Recommended Posts

Hi everyone,

According to colleagues experiences I know that Unity sometimes requires additoinal plugins for networking functions (access to databases, etc) and I saw that the websites made with Unity take a bit longer to load and sometimes its necessary for user to download additional stuff to be able to use 3d websites.

But all I know is too superficial, can anybody give me more details of why is BJS better than Unity?

Thank you all.

Share this post


Link to post
Share on other sites

Unity does not really export to the web.  Yes you can do an HTML output but it's not really optimized for a typical browser scenario.  Babylon allows you to craft an experience with a Web focus.  Also I'm  not sure but Unity html5 might not work on mobile, while Babylon definitely works on mobile.

Unity has advantages though, it has a full featured editor which is easy to use - Babylon has an editor but it's very primitive compared to what you get in Unity.

 

Share this post


Link to post
Share on other sites

For pure web development, Babylon.js is better because:

- FAR smaller (250K gzipped)

- Works everywhere (no need of wasm / asm.js support)

- Code is readable (plain JS)

- You can interact with the code from your page

- You can still rely on Unity for editing purpose and then export to babylon.js using our unity exporter

Share this post


Link to post
Share on other sites

To expand on what was already said, for me the biggest advantages are:

1) The default build is much, much smaller than Unity's default WebGL build and there's much more potential to trim that size down even further.

2) Free and open source with a code base I can understand and relate to, so extending the engine is a practical prospect for a single developer like myself.

3) I can write UI using web technology and deeply integrate it with the engine for a much better experience than Unity's UI system with much less work on my part.

4) Much easier integration with other web technologies like HTTP and Websocket requests.

Share this post


Link to post
Share on other sites

For my projects I like Babylon for:

  • No large IDE/libraries required, I can setup a local babylon dev environment in < 5min or jump into the playground instantly
  • Easily reuse existing web stack, typescript, the dom, existing js code, npm, webpack, socketio, jquery, etc.
  • No licensing

Share this post


Link to post
Share on other sites

Just curious.. why in such topics (HTML5+JS vs Something) almost nobody mentions that JavaScript is a single-threaded thing? Your code have to be very efficient to make your game enjoyable, because performance is very important.

I haven't used Unity, but fast searching shows there is multithreading in it, so potentially it should work faster with heavier applications, especially on normal multicore PCs. 4-8 cores are better than 1, aren't they?

 

What do you think about that?

Share this post


Link to post
Share on other sites

You can simulate multi-threading with smart programming.  Its not true multi-thread and there are caveats but as the webGL get closer to true OpenGL and as thigns like OpenCL gain support you are future proofing yourself.

But then again its all situational and depends on what goal you are trying to accomplish.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.