GithubHelp home page GithubHelp logo

Question: Selector node about behavior3js HOT 3 CLOSED

behavior3 avatar behavior3 commented on August 13, 2024
Question: Selector node

from behavior3js.

Comments (3)

renatopp avatar renatopp commented on August 13, 2024

Hey @EskelCz, Selector is sometimes referred as Priority, the name we use here. I always get confused when people use selector and sequence - priority avoid this kind of confusion.

I'm closing this issue, feel free to comment or reopen it if necessary.

from behavior3js.

EskelCz avatar EskelCz commented on August 13, 2024

Hi @renatopp, thanks for the answer.

I got the impression that Sequence is meant to call all nodes in you know, a sequence... but Selector to select just one. Hence the Selector. :)

I imagined a selector 'isEnemyNear' which would activate either actions 'idle' or 'run' based on some distance measuring logic. The simplest example imaginable.

From what I read in the documentation, the priority node seems to require the logic to be in the children, as to return SUCCESS or FAILURE to decide the tick propagation. Because I imagined the 'run' would always return success. Should there be another layer of nodes with the distance checking logic, before actions?

Or is it that ticking does not equal running the action? I'm confused :)

The simple example would help tremendously. Preferably with a node graph exported from the editor and the logic attached in code. That's a puzzler as well. :)

Thank you very much for clearing this out.

from behavior3js.

EskelCz avatar EskelCz commented on August 13, 2024

I've read some more about the topic, I see how I was wrong.
I recommend explanations and examples from this library:
https://github.com/libgdx/gdx-ai/wiki/Behavior-Trees

from behavior3js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.