Do you think about using Yuka for new scripts?

Hello Needle,

I’m working on creation of script to gain time for my new projects.
I was currently looking about the Needle scripts.
I found some scripts that I never used, like OffSet Constraint. After test it I didn’t found a “smooth” button to make the offset as OffSet Pursuit like with Yuka.

So I thought, are you planning to add “Yuka custom script” to Needle to add AI and Game function in the Needle Scripts ?

Have a good day !

Original Post on Discord

by user 224464722878005248

You mean mugen’s library right? Yuka | A JavaScript library for developing Game AI

Hey, what are yuka scripts?

Yeah I mean it, I found it after some research on the Three js plugin/external library

And to learn to use it, I found this youtube channel : https://www.youtube.com/watch?v=ohEtw-F1FR8&list=PLjcjAqAnHd1ENaMQ_xee0PQ2vVbUfnz2N

And I thought that it could be a good idea to implement it as script to create games (and AI !) easily.

by user 224464722878005248

Additionally, I found this library that I would implement too : GitHub - gkjohnson/three-mesh-bvh: A BVH implementation to speed up raycasting and enable spatial queries against three.js meshes.
It could add a lot of features as performance raycasting, sculting, intersection, pathtracing…

So I was wondering if you if you were going to use these libraries to add content as script form to allow easy integration of these features (innovative from a web perspective)

by user 224464722878005248

The interesting question for all of these is: how much do we add in core, vs. make easy to use if people need them

For some libraries the answer will be “this makes sense in core, everyone needs it”, others may well find a place in samples to explain how to use them

I think one advantage of the web and npm ecosystem is that it’s not required that we add things in Core, you’re not blocked from using them in a nicely integrated way since everything is just a three scene

That being said, always happy to learn more about how you think these things should be integrated / if something is making it harder then it should to use them

In one future scenario where a lot of people build on Needle Engine, an ideal thing would be that libraries like that either already have the code in place to support them (e.g. what components should be exposed) or there can be thin community contributions that add those components

So for example, if you or someone else were to create a npm package “yuka-for-needle-engine” then people could simply plug that into their projects and get components etc. this way, without cluttering the core too much with things people may not need for other projects

Yeah I see, I agree

by user 224464722878005248

Well, in the meantime, I’m going to make my own scripts until Needle grows (which will inevitably be the case given the power of the tool)
And I will share it to facilitate other developments

by user 224464722878005248

Thanks for your answer

by user 224464722878005248

Thank you! And as said we’re super happy to help to integrate things more nicely - I’m pretty sure there’s a few blockers to the above-mentioned “roll out an npm package that is plug-and-play for Needle Engine and brings components along” - but definitely a case we want to enable and support!

The only blocker to the above right now is that Unity will not import your c# components when you install packages from npm / when you ship them with an npm package. Everything else works just the same as using npmdefs

What you can do already and what will also be shareable and very likely to be upgradable to the npm workflow is using npmdefs. You can see our modules git repository as an example and build your own packages that you can add to any project :slightly_smiling_face:

I think there’s only one small step left to making the complete flow using npm packages with Unity/Blender components work

We use those in a couple different projects as well

Here are the docs to Project Structure | Needle Engine Documentation (under the hood they are also just normal npm packages hence the name)