Jump to content

BabylonHx website is online - www.babylonhx.com


gamestudiohx
 Share

Recommended Posts

Just to let you all know that BabylonHx just got its website: www.babylonhx.com

 

Its more portable than ever and also closest to BabylonJS then ever too. I would say the compatibility is about 90%, maybe a little more.

 

New feature with the latest version of BabylonHx is generation of "pure js" version of library, which means that you should be

able to simply replace original Babylon.js file with js file compiled with BabylonHx and everything should work the same.

JS version can be found here: https://github.com/vujadin/BabylonHx/raw/master/bin_purejs/babylon.js

 

I've tried it with several examples from BabylonJS playground and it worked fine with most of them.

But this is very new feature and more work remains to be done.

 

Anyway, the site is online so if you're interested take a look.

 

Also, if you're willing to try android apps (which can be downloaded from site) I would be very

grateful to know how it performed on your device (also what CPU/GPU your device have or simply your device model).

You can find contact info on the website.

Link to comment
Share on other sites

Hi,

 

This project is truly impressive. I understand that Haxe is used by a large number of people, and it's great to see people are still pumping new blood into it.

 

Your examples are also impressive, as is the first scene in the background. There's obviously been a lot of work into it. Well done :)

 

For your information, I've tried an example in Windows binaries (the bump map one), and felt that the FPS was under 60. Have you been doing benchmark? How does BabylonHS performs on other platforms?

Link to comment
Share on other sites

Nice that you now have a site that shows the install, instead of just a topic post.  I am just a little lost as what to do about my scene code though.  Are you expecting that almost everything is in a .babylon file? 

 

I should mention that I do not use .babylon files.  I have written a variant of the Blender exporter, Tower of Babel, which generates inline JS modules source and or TS classes source.  It is multi-pass process, so if this is really going to be fast, adding a Haxe classes source pass is not out of the question.  Not switching to a .babylon, since exporter allows you to pick a base class for each mesh.  This allows for OO development, having either a hand written base class, or hand written sub-class of the exported class.  Would my hand written classes need to be written in Haxe?  Also with code instead of .babylon data, everything can be done synchronously.  No callbacks just to load a scene, just

     var mesh = new MyMeshClass(scene)

 

Speaking of fast, is whatever this Haxe language is being compiled like c++,  or runtime interpreted?  Do not see how this would give me a performance edge over CocoonJS or XDK, if it still be being interpreted.  Would only get extra platforms. 

 

I am also wondering about what BJS Features are supported.  I think lists like 'supported', 'doable but different', & 'not supported' would be helpful.  Nobody wants to start down this path only to learn that say css buttons for forms or VirtualJoysticks will not work.  Since this can run on mobile devices, do the Device Orientation Cameras work?  Are their equivalent things for Cordova to control real cameras, for example?

Link to comment
Share on other sites

jahow - its very strange that windows binary felt slow... it should be really fast for everything as the Haxe code is compiled to C++ and then VisualC++ compiles that code to windows binary. can you try some other examples ? I've added BumpMap example today and win binary was compiled with Haxe 3.1.3 (the older version)

I've never experienced any slowdown with windows binaries, especially with simple scene like bumpmap.

Even on my lowend android device bumpmap example runs smoothly at 60FPS as well as most other examples that are not using some fancy effects (postprocessing...)

 

JCPalmer - I haven't looked at your Tower of Babel but if you're generating TS classes then making it to generate Haxe code will be trivial. 

About speed, yes - Haxe code is translated to C++ code for most targets (win. linux, mac, ios, android...) so you get the best performance possible. I'm sure that .apk files from BabylonHx site will perform better then any example built with CocoonJS or XDK (if not, its my fault and I'll have to do better ;)

About BJS features supported you can get pretty good idea what is supported from examples on website, every example has android and windows build available for download. I will write a list of missing features in next few days.

Link to comment
Share on other sites

Hey RaananW,

 

you should definitely try Haxe, you won't regret it !

 

By the end of this year one of the frameworks that BabylonHx works with - Lime should support consoles as well. It already supports Nintendo WiiU and it will get support for PlayStation 3 and 4 and XBox One.

It would be great to see Babylon running on these.

 

Maybe Deltakosh should consider this idea too :)

 

I see no reason for not using Haxe in developing Babylon and there are so many reasons for actually doing it.

Link to comment
Share on other sites

Well, not to be asking all stupid questions, I have gone to haxe.org & also to your repository, and started looking around.  One thing that is eluding me is, are you maintaining this entire directory by hand? https://github.com/vujadin/BabylonHx/tree/master/com/babylonhx

 

I notice that Engine.hx has a version 2.0.0 in it, but I also see some 2.1 stuff too.  Considering how fast BJS is advancing, is keeping up possible? I see a number of Typescript to Haxe converters, so I assume when a new typescript file is added you do a initial port from one of them, at least.

 

I also see that directory is missing Audio & Debug.  Debug is not a production feature, but Audio is.  If one wanted to implement Audio say, would you do an initial typescript convert, then surround it  with #defines for when in purejs, & write comparable code when not?

Link to comment
Share on other sites

Not sure what "maintaining this entire directory by hand" exactly means but I guess I do... 

Everything I was working on up until now works the  same across targets and across libraries used (Lime, NME and Snow), so using the single code base you would get exactly the same result no matter which platform you target and which library you use. It was relatively easy as all three libs are using SDL 2 behind the scene to provide access to OpenGL/WebGL and they all provide the same api based on WebGL.

Library specific stuff is located in https://github.com/vujadin/BabylonHx/tree/master/com/babylonhx/utils 

I was also able to make assets loading working the same.

Now that I have a stable base, its relatively easy to keep up with BJS. Of course, any help would be highly appreciated and welcomed.

 

But audio is not that easy. 2D is also not that easy, at least not if I would try to make it work the same across all three libs. Its much easier on the web where you have DOM and Canvas2D...

 

That's why Audio and Debug are missing. If one would decide to use BabylonHx for his/her next android game today, he/she would have to select one of these three libs and use its audio api for implementing sound in game. Which is not that bad. 

 

Having a single audio api similar or the same as the one in BabylonJS would be great, but its a lot of work...

 

I haven't seen yet any TypeScript to Haxe converter, I doubt that its even possible. While TypeScript is "typed", its not "typed" enough to call it a strongly typed language which Haxe is. There are some converters that are used to create Haxe "externs" form TypeScript code, but those are only classes/methods declarations (typing stuff) - not implementations, and they are used only in JS development with haxe. 

 

I'm porting everything "by hand" from typescript. 

 

If one would like to implement Audio that works ONLY in JS target then yes, one would convert typescript code to haxe and surround it with #defines for js/purejs.

 

If you're interested in starting with BabylonHx and the information provided on site is not enough for you to get started or some info is missing, fell free to ask me anything. I would be glad to help.

Link to comment
Share on other sites

Thanks,

It is a very interesting approach.  I really like the potential CPU efficiency & multi-threading possibilities.  As a mobile game solution, is looks pretty viable as long as the game is not trying to access hardware on the devices, like accelerometer with either device orientation cameras.

 

The approach allows you to use the libraries of other tool kits, which is good.  You will run into the same issues as anyone using one, but at least you can switch around based on the platform using #defines.  In the accelerometer example, you might use purejs for iOS, and Flash for Android & MS.  This is probably only going to acceptable at the application level though.  If BabylonHx did it, there would be a lot of issues from people who did not use that camera & wondered why they were restricted.  I wish there was more a of common api for hardware access whose implementation was customized by each OS.

 

To be fair, XDK does not work with the device orientation cameras either.  They use Cordova to access the accelerometer, but not the same API.  When I tried a Cordova project, nothing seems to work (probably me doing something wrong though).  And everybody has problems with sound across all platforms.

Link to comment
Share on other sites

When we develop with babylonhx ,  what do we do for UI ?

 

We have developed web app in babylon 3D logic + angular/html/css UI.  So if we want to port to babylonhx for targeting mobile devices, how will that work ? Specifically how do we port HTML/css UI ?

Link to comment
Share on other sites

  • 2 months later...

For the record, the Lime and OpenFl backends are somewhat separately used (as I understand from the separate run targets and MainLime.hx vs. MainOpenFl tests).

 

How is the previously mentioned work on the 'incomplete/missing features' list going?
____________________
Haxe/HaXe is apparently pronounced like 'hex' or the letter 'eks', not as in 'hacks', 'haxors', or 'axe'. Thanks, French (Nicolas Canasse). ;)

Link to comment
Share on other sites

  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...