About mobile apps and the future of native

I am figuring out what to use for my next app, which will be some sort of 3D game. I need to release it as a mobile app. Javascript is my prefered programming language and I was wondering if Babylon would be de library to use.

I have red about Babylon Native so I was wondering: would this be something to use for mobile apps that can be distributed through app stores?

And I see development started a few years ago, is it nearing completion in the foreseeable future?

Are there manuals or more indepth tutorials on how to use it? I’ve seen a few video’s that just scratch the surface and mainly serve as a proof of concept.

Hello and welcome to the Babylon Community! We have a documentation page covering the choice of using Native :smiley: BabylonNative/WhenToUseBabylonNative.md at master · BabylonJS/BabylonNative (github.com)

Babylon Native has been and will be in development for the future, we don’t have a “completion” point as there will always be new features and improvements that can be added :slight_smile: You can check out which features from Babylon.js core are currently supported in Native here: BabylonJS/BabylonNative: Build cross-platform native applications with the power of the Babylon.js JavaScript framework (github.com)

About tutorials, that’s something we need to work on more, but @srzerbetto @bghgary and the rest of the Native team are always on the forum and are glad to help with anything :slight_smile:

Thanks, that was helpful but please allow me to double check if I understand this correctly:

  • Babylon Native is not voor JS applications to turn native on - i.e. - android or iOS.
  • Babylon works with Cordova-like turn-web-apps-to-native-apps tools.

The last point would be a great relief since other 3D libraries like ThreeJS wo’nt work in that scenario.

Hello @Fedor_van_Eldijk , once again welcome to the Babylon Community!

Babylon Native is a way to create a native application capable of running babylon.js javascript code. It starts as a native application (Java on android, objective-c on IOS) that consumes our C++ libraries and allows it to run scripts with code that uses babylon.js (like games and 3D viewers). Using Babylon Native do create a mobile game is completely possible and your game will just like a normal native app, main difference been that most of your logic will be done in Javascript scripts.

However, if you wish to target only mobile, a better option might be to use Babylon React Native. It uses Babylon Native under the hood to allow React Native applications do consume babylon.js code. It will give you all the benefits of working with React Native (such as live reload and been able to have a single project for all platforms) and should give you all the capabilities supported by Babylon Native.

I would suggest going for Babylon Native instead of Babylon React Native only if you must have higher level of control over the interaction between the native part of you game and the JavaScript part.

We have a sample project on how to use Babylon React Native:
BabylonJS/BabylonReactNativeSample (github.com)

As well as a blogpost explaining how to create a project from scratch using Babylon Native (Desktop only though):
Getting cross platform rendering with Babylon Native and GLFW | by Babylon.js | Aug, 2022 | Medium

Thanks for your explanation, but I need to double check again to see if I really understand this right:

So I can bundle React Native with my javascript web app to create - par example - an android .apk that I can distribute through the Google Play store?

Yes, a React Native project supports publishing to both the Apple App Store as well as the Google Play Store.

1 Like