Why is Babylon Native so tough, can anyone help

babylon native is too tough, documentation just shows you how to build playground app ,not your own code. i tried i could only build and see playground app that cube thing only, how do i convert my playground code app into native executable, no detailed documentation for beginners,web version is so easy, just go to playground write code click download and publish .why there is a download button for native app in playground.i am using babylonjs because its easiest after roblox. native is complicated dont know what to drag and drop (that youtube videeo) what part to modify in my own codebase(my web verion start with createscene and end at return scene), what part of babylonjs runner to replace dont know,any tutorial for beginners will be appreciated or a download button in playground just like web version.

Hey, welcome :slight_smile:

I’m concerned about this :

What do you mean publish ? Are you developping some HTML5 games ?

This is specific to the BabylonJS playground, which is made to simplify testing, by letting use code only the createScene() while the rest (Canvas, Engine, renderloop, onResize, etc) is already binded. But in a “normal” usage of BabylonJS, this createScene function could be a very little part of the app, while a lot of other stuff are created on top of it


What is your goal with BJS exactly, and why are you going toward Babylon Native ?
Following the official Babylon Native page, here is the main goal of Native :

You code your application in JavaScript and the Babylon Native Runtime runs it on platform native graphics APIs (DirectX on Windows, Metal on iOS/MacOS, OpenGL on Android, and OpenXR devices such as HoloLens 2 and Oculus).

What I mean is that you only use Native if you absolutely NEED to go toward native app, targetting specific hardware, etc. For example, let’s say you plan to publish a BabylonJS game on Steam for PC & Mac, and want to do it using BabylonJS, an Electron app will be fine, staying in an encapsulated web context (without any Babylon Native I mean)


Sorry if you know about all of these already, but following the above quotes, I feel like you might be using the wrong tool :slight_smile:

7 Likes

i am using babylonjs for just about a week, and i have developed few casual games for all platforms babylonjs supports (web,androi ios windows mac linux) ,Before i move to o3de or nu game engine for more serious games(will continue using babylonjs), i have already successfully ran one of my game to native windows app since i posted here for help . i was just requesting for more beginner friendly documentation for babylojs native and a download feature in playground,(many game engines does that, eg. Gdevelop and babylonjs itself for web). my observations are 1. babylonjs is easiest engine out there after roblox (for 3d) until you hit native. 2. there is difference between whats supported on web and what is supported on native , 3, there are a lot of option to bring your game to native platforms. Point no 2 makes it tough for beginners to use babylonjs native.

I did ran my game by watching one of the tutorial on youtube by bjsgarry, that drag and drop thing you have to do. i am still fully not understood the entire process for creating native executable ,it seems like documentaion on github is for how to build a native version of playground app. How do i build my own game instead of building playground app and not do that drag and drop thing to run game . if anyone actually created an executable of their game for windows using babylonjs native they will know this.

If you have a Web playground that works, that you don’t have much experience with Native and want quickly your game to run in an .exe then use Electron.

If you already have an app (mobile or Desktop) and want to add 3D functionalities, then BabylonNative is the way to go. It’s easy to integrate but you’ll need some knowledge of native development.

If you want to have headless functionalities like computing renders of 3D meshes on a server, then Native is also the way to go. There are other cases more favorable for Babylon Native like XR and more that I don’t have in mind.

cc @bghgary

1 Like

There is no doubt we can make specific native scenarios easier, but that isn’t the goal of Babylon Native generally as others have already pointed out.

Here are some relevant documentations.

  1. Multiple Platforms | Babylon.js Documentation
  2. BabylonNative/Documentation/WhenToUseBabylonNative.md at master · BabylonJS/BabylonNative

Specifically, the second link should give you an idea of when it’s appropriate to use Babylon Native.