Jump to content

BabylonHx 2.0


gamestudiohx
 Share

Recommended Posts

4 minutes ago, NasimiAsl said:

thanks  i respect all people in here this is best knowledge community at all

maybe i start .hx project for babylonjs need review before i start

Dude, I will be glad to help revive this in anyway I can... just let me know 

Link to comment
Share on other sites

2 minutes ago, NasimiAsl said:

we can start together i wanna put one day in week about that Friday is best for me

That works for me as soon as I get back to Maui... I'm stuck on bed rest in Arizona at my moms house... I just had spine surgery and I gotta wait 2 more weeks before my doc will clear me to fly home. I only have my iPad here and can't do shit... I am so freakin bored without my pewter ?

Link to comment
Share on other sites

just a bit of advice - don't go with https://github.com/jeremyfa/node-ts2hx

these converters are no good for real world projects, especially for a big one like babylonjs. they work on simple stuff, but give it for example https://github.com/BabylonJS/Babylon.js/blob/master/src/babylon.engine.ts and it will dye. as the author said 'it was a proof of concept' anyway.

ts and haxe have similar enough syntax to use ts file and start doing conversion to haxe 'by hand'. this is my approach and it worked well. its just an advice though.

anyway, if you guys are interested in keeping babylonhx alive and if you want to take active part in its development I might consider getting back to it. its too much work for a single person.

Link to comment
Share on other sites

36 minutes ago, gamestudiohx said:

just a bit of advice - don't go with https://github.com/jeremyfa/node-ts2hx

these converters are no good for real world projects, especially for a big one like babylonjs. they work on simple stuff, but give it for example https://github.com/BabylonJS/Babylon.js/blob/master/src/babylon.engine.ts and it will dye. as the author said 'it was a proof of concept' anyway.

ts and haxe have similar enough syntax to use ts file and start doing conversion to haxe 'by hand'. this is my approach and it worked well. its just an advice though.

anyway, if you guys are interested in keeping babylonhx alive and if you want to take active part in its development I might consider getting back to it. its too much work for a single person.

Count me in to help... @NasimiAsl already is down to help... plus it would be much better to bring what you have done already with BabylonHx up to par than to start over.

Just let us know how we can help ... Btw... Glad to have you back @gamestudiohx ... not that ever really left ?

Link to comment
Share on other sites

@Sebavan I was thinking about BJS becoming cumbersome in general. Its quite a lot of code, the minified lib is 1.3M (compared to three.js which is about 0.5M I think). Its hardly a 'light weight engine' anymore, but this is just my personal preference and I'm not criticizing BJS, I still love it and I think its fantastic. But from a point of view of someone who makes Haxe port of it, it has become cumbersome and thus very hard to maintain.

There's no specific part I can point to, its all fine from a js perspective. But in Haxe (being a strongly typed lang) things are bit different. I've started having a problems with the introduction of https://github.com/BabylonJS/Babylon.js/blob/master/src/Mesh/babylon.buffer.ts class. In js its easy to interchangeably use js array or typed one (Float32Array), but this is not so easy in Haxe. Its certainly possible but either there would have to be change in API or there would be a performance hit in some target. And this is used throughout the BJS. And there are other problems as well and I had to make a lot of compromises and changes in BHx. But the bigger the changes are, harder it becomes to keep up with BJS progress.

 

Link to comment
Share on other sites

@gamestudiohx Ok good to know it is related to mainly the JS usage and I understand the maintenance effort. We also have a way now to create lighter config for bjs: https://doc.babylonjs.com/generals/how_to_start#custom-builds.

Maybe there could be a subset dedicated to the Haxe port to make it smaller and easier to adapt not included the none portable js parts ?

Link to comment
Share on other sites

Wow - this is a great initiative.  Has any consideration gone into converting BJS vNext (4?) to Haxe, so it would not require manual maintenance for a haxe port?  It would be interesting to know if it is feasible.  Seems to me like the primary purposes of Typescript conversion [1] would apply to using Haxe as the primary language, while being able to target compilation to additional languages like c# and java.

[1] I'm referring to article here from 2014 https://www.eternalcoding.com/?p=103

If there is a list of tasks I will make some time to help out, but it does seem too cumbersome to maintain perpetually with the frequent BJS commits.

Link to comment
Share on other sites

  • 1 month later...

I've just updated BabylonHx repo on github https://github.com/vujadin/BabylonHx

I've done quite a lot of work but there is a lot more to be done. Here's a little demo from BabylonHx-Next: http://babylonhx.com/next/

Things to be done:

1. Rendering pipelines (DefaultRenderingPipeline doesn't work, haven't tried others but I guess they don't work too)

2. Animations 

3. Shadows

4. Tons of other things...

I've dropped support for two Haxe libs that BHx was compatible before: Snow and NME (these aren't used by Haxe people that much anyway). So now BHx works only with Lime/OpenFL. This will make further work much easier. 

Right now only WebGL build is working. For anyone interested in getting involved - grab latest Haxe here and latest OpenFL(Lime) here and help me with BabylonHx-Next :)

 

Link to comment
Share on other sites

  • 1 month later...

@gamestudiohx I have just tried running haxe on the default sample project on your repo and face an issue with OpenFL/Lime Type not found : lime.audio.AudioSource

I am trying to see how the cpp generation would work for me :-)

Any ideas ? Thanks a lot in advance.

I guess I miss more than that cause even without the audio import I have:

com/babylonhx/bones/Bone.hx:51: characters 3-29 : Float has no field copyFrom
src/MainLime.hx:44: characters 30-34 : Bool should be lime.graphics.opengl.WebGL2Context
src/MainLime.hx:44: characters 30-34 : For function argument '_gl'
src/MainLime.hx:185: characters 2-14 : com.babylonhx.Scene has no field init2D
src/MainLime.hx:207: characters 2-15 : com.babylonhx.Scene has no field stage2D
src/MainLime.hx:207: characters 29-54 : Type not found : com.babylonhx.d2.text.FPS
src/MainLime.hx:259: characters 2-15 : com.babylonhx.Scene has no field stage2D
src/MainLime.hx:266: characters 2-15 : com.babylonhx.Scene has no field stage2D

Probably a version issue ???

Link to comment
Share on other sites

@Sebavan I've updated MainLime.hx, lime.audio.AudioSource is now lime.media.AudioSource but its not needed anyway...

Have in mind though that currently you won't be able to see anything if you target windows because webgl2 api is not available yet. There has been some progress there, you can see here http://community.openfl.org/t/native-opengl-framebuffer-multiple-render-targets-support-possible-gl-drawbuffers-not-supported/9408/4 (I guess WebGL2/GLES3 API will be available on all platforms in next Lime release)

You can target windows by using WebGL1 api if you change WebGL2Context with WebGLContext here https://github.com/vujadin/BabylonHx/blob/master/src/MainLime.hx#L49 but many things won't work as I'm focused mainly on webgl2 right now.

But you should be able to target android or ios with WebGL2Context I think

Link to comment
Share on other sites

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...