Samuel Girardin Posted March 28, 2018 Share Posted March 28, 2018 Hi, I've made few playgrounds using energy.js (it's a physic engine) , so you can test the engine live. It's still an alpha version, but you can fun ! bounce box ball joint wood machine vehicle (arrow keys) Typescript sources, grunt, etc : github It's quite tricky to get the engine works on the playground (append script and refresh), maybe you can have after multiple run a memory error). sam Arte, RaananW, Pryme8 and 8 others 11 Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted March 28, 2018 Share Posted March 28, 2018 best post all month. JackFalcon 1 Quote Link to comment Share on other sites More sharing options...
adam Posted March 28, 2018 Share Posted March 28, 2018 Quote VM162:140 Mixed Content: The page at 'https://www.babylonjs-playground.com/#URPXQB' was loaded over HTTPS, but requested an insecure script 'http://www.visualiser.fr/energy_playground/energy.js'. This request has been blocked; the content must be served over HTTPS. Chrome redirects to https for me. I was finally able to view the PGs in Firefox, though. Thanks Quote Link to comment Share on other sites More sharing options...
Samuel Girardin Posted March 28, 2018 Author Share Posted March 28, 2018 Assets are on http Quote Link to comment Share on other sites More sharing options...
JackFalcon Posted March 28, 2018 Share Posted March 28, 2018 On 3/28/2018 at 10:28 AM, Pryme8 said: best post all month. yep. Quote Link to comment Share on other sites More sharing options...
jerome Posted March 28, 2018 Share Posted March 28, 2018 huge !!! Quote Link to comment Share on other sites More sharing options...
BitOfGold Posted March 29, 2018 Share Posted March 29, 2018 Just when I finished integrating Ammo.js into my project ... (crying inside) JackFalcon 1 Quote Link to comment Share on other sites More sharing options...
Samuel Girardin Posted March 29, 2018 Author Share Posted March 29, 2018 Ammo is really good too. new playground : http://www.babylonjs-playground.com/frame#89WEV3#0 important : check playground url , must start with http not https RaananW, JackFalcon, royibernthal and 1 other 4 Quote Link to comment Share on other sites More sharing options...
JohnK Posted March 29, 2018 Share Posted March 29, 2018 18 minutes ago, Samuel Girardin said: important : check playground url , must start with http not https Start url with http but PG defaults to loading https Quote Link to comment Share on other sites More sharing options...
1glayfan Posted March 29, 2018 Share Posted March 29, 2018 Do you have plan to support npm package ? it would make it much easier to use it. Quote Link to comment Share on other sites More sharing options...
Samuel Girardin Posted March 30, 2018 Author Share Posted March 30, 2018 9 hours ago, 1glayfan said: Do you have plan to support npm package ? it would make it much easier to use it. Nope, engine is still in alpha. This is not a priority , I need to add features, and fix few memory leaks. JackFalcon 1 Quote Link to comment Share on other sites More sharing options...
Guest Posted March 30, 2018 Share Posted March 30, 2018 And a plugin for bjs? (pretty please?) JackFalcon and adam 2 Quote Link to comment Share on other sites More sharing options...
MackeyK24 Posted March 31, 2018 Share Posted March 31, 2018 12 hours ago, Deltakosh said: And a plugin for bjs? (pretty please?) Pretty pretty pretty please How is Energy.js compared to ammo.js.... Can Energy.js handle Terrain meshes or heightmaps and use other colliders besides sphere like cannon issues??? Can you do Cloth with energy js... I too was about to start playing with porting Ammo.js as well... I cant tell how far @BitOfGold or @RaananW got with this... so was going to give it shot myself... BTW... How far are guys... can i check out anything ??? JackFalcon 1 Quote Link to comment Share on other sites More sharing options...
Samuel Girardin Posted March 31, 2018 Author Share Posted March 31, 2018 @MackeyK24, ammo vs energy : about the native engines, bullet (ammo is based on bullet) was developed after Ode (energy is based on ode), so I suppose Ammo is better. About the asm or wasm port with emscripten, ammo is a kind of automatic port, on my side all is done manually I expose only needed classes and methods. About perfs, I really don't know, but the matter is not to say, the engine handle 1000 boxes at 60 fps,. I think physic engine are really tricky, hard to tune, you really have to test and test to perform good simulation., and to learn the engine. About the car demo , both trimesh and heighmap, line 52 set the last boolean to true, and search subdivide repalce 512 by 256, finally it s here http://www.babylonjs-playground.com/#A5NDZJ#48 Cloth : no. About the plugin I will answer later this day in demo and project topic JackFalcon, MackeyK24 and HeadClot 3 Quote Link to comment Share on other sites More sharing options...
MackeyK24 Posted March 31, 2018 Share Posted March 31, 2018 28 minutes ago, Samuel Girardin said: @MackeyK24, ammo vs energy : about the native engines, bullet (ammo is based on bullet) was developed after Ode (energy is based on ode), so I suppose Ammo is better. About the asm or wasm port with emscripten, ammo is a kind of automatic port, on my side all is done manually I expose only needed classes and methods. About perfs, I really don't know, but the matter is not to say, the engine handle 1000 boxes at 60 fps,. I think physic engine are really tricky, hard to tune, you really have to test and test to perform good simulation., and to learn the engine. About the car demo , both trimesh and heighmap, line 52 set the last boolean to true, and search subdivide repalce 512 by 256, finally it s here http://www.babylonjs-playground.com/#A5NDZJ#48 Cloth : no. About the plugin I will answer later this day in demo and project topic Wow... That is amazing... the car demo on a terrain.... I am creating a Terrain Building System For The Babylon Toolkit... But Cannon cant quite handle terrains that well and the heightmap and mesh support sucks. I love your demo... I been debating if i am going to go with doing a port of Ammo.js ... But i would hate to go thru ALL the tedious shit in port Babylon.CannonJSPlugin to work with the Ammo.js C++ Bindings and someone else Like @BitOfGold or @RaananW has already got that working... Would love to hear from you guys on that Quote Link to comment Share on other sites More sharing options...
BitOfGold Posted April 1, 2018 Share Posted April 1, 2018 @MackeyK24 I'm using Ammo through colyseus.js on the server side, and in a separate worker script with game logic in browser. It's really different from a BABYLON plugin so I think i cannot make a plugin from that. (It's mixed with game logic) Ammo is really fast with the WASM version of it, I really don't know Energy js is faster or slower. Most of my problems with Ammo/wasm is its really easy to make memory leaks and then it chrashes. Yes it's tedious to interface with Ammo/Bullet, but its several times faster than cannon. Quote Link to comment Share on other sites More sharing options...
PhilT Posted April 10, 2018 Share Posted April 10, 2018 This is awesome! Great to hear this is still being worked on! I'd be happy to integrate Energy into a demo I'm working on that compares the engines. I've got Cannon, Oimo and Ammo running the same collapsing blocks demo. Be great to integrate this. I plan to release it this week. Would love to add it before release but could always add it later. BitOfGold and JackFalcon 2 Quote Link to comment Share on other sites More sharing options...
MackeyK24 Posted April 10, 2018 Share Posted April 10, 2018 1 hour ago, PhilT said: This is awesome! Great to hear this is still being worked on! I'd be happy to integrate Energy into a demo I'm working on that compares the engines. I've got Cannon, Oimo and Ammo running the same collapsing blocks demo. Be great to integrate this. I plan to release it this week. Would love to add it before release but could always add it later. How did you get Ammo.js working ??? Quote Link to comment Share on other sites More sharing options...
PhilT Posted April 12, 2018 Share Posted April 12, 2018 On 10/04/2018 at 8:46 AM, MackeyK24 said: How did you get Ammo.js working ??? This post by @JohnK. Thanks again John. Quote Link to comment Share on other sites More sharing options...
PhilT Posted April 13, 2018 Share Posted April 13, 2018 So I integrated Energy into my collapsing wall demo which I'll be publishing this weekend. Initial tests seems indicate it's about on par with Cannon.js so one of the slower ones. However, I appreciate it's alpha and my implementation is probably less than optimal so take it with a grain of salt. I basically ripped some code out of the bouncing box demo and added some friction with mu surface parameters. It kinda looks similar to the other demos but they all behave slightly differently anyway (another interesting thing to see). Quote Link to comment Share on other sites More sharing options...
Guest Posted April 13, 2018 Share Posted April 13, 2018 Did you write a bjs plugin for it? Quote Link to comment Share on other sites More sharing options...
Samuel Girardin Posted April 13, 2018 Author Share Posted April 13, 2018 Thanks for testing energy.js, and i'm really sorry that the engine is really slow. Quote Link to comment Share on other sites More sharing options...
PhilT Posted April 15, 2018 Share Posted April 15, 2018 @Deltakosh No just re-purposed the examples from the repo Quote Link to comment Share on other sites More sharing options...
PhilT Posted April 15, 2018 Share Posted April 15, 2018 The comparison is now live at: http://games-matter.com/assets/enginetest/ The fact the bricks fall in different ways could affect the framerate here as well. Cannon for example seems to hold the wall together quite well but as a result I think it's having to do a lot of work. @Samuel Girardin do you think tweaking the surface parameters would help performance here? BitOfGold 1 Quote Link to comment Share on other sites More sharing options...
BitOfGold Posted April 15, 2018 Share Posted April 15, 2018 @PhilT Thank you, this is cool! Good to see a base comparison between engines! I was searching for this for weeks. Now we have several comparisons, yours, @lo.th 's Labs... https://lo-th.github.io/Energy.lab/#basic http://lo-th.github.io/Ammo.lab/#basic Ammo's broadphase is very good when less objects are moving and more are static (jumps up to 60FPS when bricks stop moving) It is ideal for games, as this the frequent case with a few moving characters, objects, triggers and many static elements. A very good signal is that playcanvas uses Ammo now. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.