Advantages of Babylon over wasm builds

Hi guys, I have been using Babylon for about two years now. I love it as well as the community and the Babylon team. I have read a lot of the documentation and watched all of the tutorial videos numerous times in order to create small file/ fast loading and great looking 3d games for the web. I am not a coder but have learnt it on code academy in order to use Babylon. I see there are other options that could potentially offer what I’m looking for (defold and unity builds in wasm can be small?) and given I have invested so much time and effort in the engine I guess I am after some assurances that I made a good decision to work in Babylon. What would you say are the main advantages to using Babylon over these other options in your opinion?
I almost feel dirty asking this question since the Babylon team has worked so hard on creating such a great engine :smiley: Also thank you @Deltakosh @PirateJC for your great videos

1 Like

One thing that comes to mind regarding WASM builds is the cost of calling it from JS. Everytime you call a WASM function from JS, you have a lot of overhead, and pure wasm builds are not real because you need to use some JS around it to make it work.

This means that sometimes WASM is slower than pure JS.

Personally I also love not being forced into an editor GUI, I can do everything by code.

BabylonJS also allows you to target native platforms with Babylon Native just like Unity, but you can’t deploy to consoles I believe.

That’s my 2 cents anyway ^^

4 Likes

Yep! Unity has to transpile the code, build the WASM and generate JS code. These automated tools are prone to include a lot of bullshit in the resulting app. It’s far more effective to use JS directly. Nowadays we have WebGPU, blazingly fast CPUs even on mobiles, the super fast V8 JS engine therefore if the target is the web I would everytime choose babylon.js.

3 Likes

side but still useful:
Why WASM is not the future of Babylon.js | by Babylon.js | Medium

5 Likes

I read this already :slight_smile: Cool article however OP is asking whether to use unity wasm (or any other game engine with html support) or pick babylon.js.

1 Like

yeah yeah. I know it was side but still interesting to avoid the question :smiley:

1 Like

If you’re looking to make a web browser game, I believe that Babylon.js is the best choice. Its helpful community and core team with leading expertise gives me confidence that Babylon.js will continue to lead in features, performance, developer experience, and more.

If you’re looking to build a desktop or cross-platform game, Unity can be a good choice, though you can also use (1) Babylon Native or (2) Electron to turn your Babylon.js browser game into a desktop game.

I cannot emphasize enough how great it is that Babylon is open-source and transparent. Unity is closed-source and recently had a fiasco where they attempted to impose new unreasonable pricing, shocking developers worldwide. It can be scary using a closed-source engine where rules can change at any time, potentially forcing you to shut down your game and rewrite it in another engine.

4 Likes

Don’t forget about the mess that is their system of rendering pipelines…

3 Likes