Yuka is a JavaScript library for developing Game AI. Yuka is a standalone library and independent of a particular 3D engine. The idea is to implement the actual game logic with Yuka and the visual representation with your preferred JavaScript 3D library.
Until now all Yuka examples were made with Three.js. I started from steering behaviours - have a look at Yuka | Examples with Babylon.js
If you would like to participate in this project, let me know
I was doing some research on native game engines and concluded yuka drew a lot of “inspiration” from opensteer (developed by sony a long time ago). It also seems to commonly be used in conjunction with recast, which is great because bjs already uses recast. Hopefully, this background knowledge can help widen the search on ideas.
I want to evaluate YUKA and compare with recast.js. I am too lazy to init a new project, so I tried to get YUKA into a babylon.js PG. It seems to be working fine. Here is a blank PG with YUKA imported.
Update: Somehow after reloading browser, YUKA is not loaded first time and give error. Need to press Run button then it starts working.
It seems you don’t need your own animate function to step babylon scene rendering and yuka world. You can subscribe to scene.registerBeforeRender. The babylon way!
renderComponent is the cone mesh created in babylon.js. entity is the cone modeled in YUKA environment. It seems this api to set transformation matrix to the cone doesn’t work in babylon.js 5.0 any more, but works in 4.2.
Sure, for PG it will work. For standalone examples it may depend.
Also, Yuka lets to separate the game logic from the rendering engine; it is up to you to decide which one to use.
LOL that’s much simpler, I could have sworn importing modules didn’t work in playground when I tried it a few weeks ago for Rapier. Thanks for info and fix!
The BabylonJS examples we are hardly working on with @labris are not intended to demonstrate BabylonJS at it’s best in the first round but mainly to show YUKA’s capabilities.
We are using the THREE examples for the base code and the existing helper classes created for THREE and are rewriting them. There are lot of things we would do absolutely differently but starting from scratch would take ages to finish the examples and we wanted to deliver ASAP.
After we release the first version feel free to contribute and rewrite the examples in a better way. So basically the examples are not currently about BabylonJS best practices.
However we have plans to rewrite the examples in TS from scratch implemented with best approaches known to us.