Search Unity

NodeCanvas - (Behaviour Trees | State Machines | Dialogue Trees)

Discussion in 'Assets and Asset Store' started by nuverian, Feb 8, 2014.

  1. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Hello again Vectrex,

    Please open up CheckCSharpEvent.cs and replace line #34 with:
    pointer = m.NCCreateDelegate(eventInfo.EventHandlerType, this);

    Thanks :)

    Hello rocki,
    That might be one way to do this. While I dont really prefer this as I deem that NC pricepoint is very fair considering the amount of features and full souce, I will consider this for the future.

    Thanks
     
    landon912 likes this.
  2. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    The official website is back online.
    Sorry for the inconvenience
     
    Pajaroide likes this.
  3. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,462
    Nuverian,

    I definitely agree that NodeCanvas is worth every cent for the incredible features that it offers. I think private sales are usually something businesses use to stimulate interest and increase revenue in slow periods or holiday seasons or for the purpose of collecting more revenue for development. This method is being used by very popular packages like PlayMaker, NGUI .
     
  4. bhads44

    bhads44

    Joined:
    Feb 19, 2013
    Posts:
    37
    Nuverian,

    I am a visual learner and have been trying to get my head around NodeCanvas documentation for a few weeks. Since you have no videos, can I ask that you create an interaction example. In your example demos you have soldiers following a sphere. Can I ask that you extend this example to include an Enemy Health Manager, so that if I were to click on the soldiers a couple of times it would remove/disable them from the scene. What I am really interested in is how one object (the Enemy Health Manager) would interact with the soldier objects, how the Health variables would be accessed and responded to. If I could see this working, it would be very helpful.

    Thanks.
     
  5. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Hello and sorry for late reply.

    I am not sure what exactly you mean by a health manager, but there are couple of ways to do something similar in NC. You can either have a blackboard variable named "health" for the enemy and when click on it, subtract 1 health. If health drops to zero, destroy the enemy or otherwise.
    click and death.png

    Alternatively instead of storing the health in the blackboard you could store it in one of our own scripts and call custom function on it like "ReceiveDamage". Example follows:

    click and death2.png

    HealthScript.cs
    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3.  
    4. public class HealthScript : MonoBehaviour {
    5.  
    6.     public float health = 10;
    7.  
    8.     public void ReceiveDamage(float dmg){
    9.  
    10.         health --;
    11.         if (health <= 0){
    12.             Die();
    13.         }
    14.     }
    15.  
    16.     public void Die(){
    17.  
    18.         Destroy(this.gameObject);
    19.     }
    20. }
    21.  
    In the Demo1 the 2nd option is better since in that demo all soldiers are using one common blackboard instead of each one, a local blackboard.

    Let me know if you need more help on the matter :)
    Cheers
     
  6. bhads44

    bhads44

    Joined:
    Feb 19, 2013
    Posts:
    37
    Thanks for that. It is very helpful . But I'm really interested in looking at some code that will allow an external script to access that blackboard health variable you've created there. Can you please show me an example of that.
    Thanks.
     
  7. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    It's very easy to access a blackboard variable. All you need is a reference to the blackboard component and use 2 methods. For example to access a float variable named "health" on a blackboard:

    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3. using NodeCanvas;
    4.  
    5. public class Example : MonoBehaviour {
    6.  
    7.     public Blackboard blackboard;
    8.  
    9.     void Start(){
    10.         Debug.Log( blackboard.GetDataValue<float>("health") );
    11.         blackboard.SetDataValue("health", 13f);
    12.     }
    13. }
    Cheers
     
  8. bhads44

    bhads44

    Joined:
    Feb 19, 2013
    Posts:
    37
    Thanks. That's what I was looking for. Much appreciated.
     
  9. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    By request, NodeCanvas is now on big 50% sale!
    Get it now while it lasts! :)
     
    Pajaroide likes this.
  10. Pajaroide

    Pajaroide

    Joined:
    Sep 19, 2012
    Posts:
    34
    Awesome! Buying it right now!
     
  11. cyby89

    cyby89

    Joined:
    Apr 30, 2014
    Posts:
    35
    Do you have an integration with the A* Pathfinding Project for tasks such as wandering or move to point?
     
  12. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Hello, Sorry for late reply.

    There is currently no integration with A* Project, but it's extremely easy to create your own actions tailored to do whatever you want to do in your game, or better yet call functions on existing components directly.

    Cheers!
     
  13. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    By the way I forgot to tell you that there is an unofficial package for A* on the Asset Store:
    https://www.assetstore.unity3d.com/en/#!/content/20482
    But it is more advanced than what you are after I think, in a sense that it fiddles with more internal A* stuff :)

    Cheers
     
  14. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    I have added a page to the documentatiion that lists all the included Action and Condition Tasks as of now.
    If you feel something is missing let me know and it will be added.

    Cheers
     
  15. Marble

    Marble

    Joined:
    Aug 29, 2005
    Posts:
    1,268
    I'm trying to make some fairly specific extensions to the NC state machine, and I was hoping that a couple changes in scope could be made:

    Right now, I can't always override what summaryInfo a Node or Task puts in its window on the canvas (Node.NodeWindowGUI() is private and summaryInfo is often sealed on e.g. ConditionTask and ActionTask). I also don't appear to have control over the node's automatic resizing? Could the appropriate methods be made virtual so that inheriting classes have control over this? I can change the source, but I'd rather not break things every update. :)

    I'd also like to create a type of Connection that doesn't default to collapsed connection text. Connection._connectionInfoExpanded is inaccessible in subclasses.

    Finally, I've run into the same sort of thing in FSMState. I want to use the existing FSM, but not check conditions every frame. I've made FSMState.OnUpdate virtual so I can run my own transition check.

    Obviously these are luxury requirements, but they would certainly make it easier to update. Thanks for your great tool.
     
    Last edited: Nov 22, 2014
  16. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Hello marble,

    Let me answer some of your questions :)

    1. If you want to customize the text a task displays, you should override the property named 'info'. If you are making your own nodes (not task), you can customize what the node shows by overriding method 'OnNodeGUI' .

    2. Resizing nodes is handled on a second layer after everything is drawn and if the GUI changed, so it's rather difficuly to allow control for it in the sense that you describe it. One way this could be done is to have a property like "doAutoResize" and override this in your node to define if it does, but I am not very fond of adding such properties for extremely rare cases. But, the node will resize to everything you throw at it in the OnNodeGUI method, so you implicity do have control over it. For example, if you draw a GUILayout.Box 100x500 pixels, it will resize to that.

    3. Well, I really prefer to expose as few public stuff as possible, especialy regarding the GUI, so that there is a cleaner API. Unfortunately for auto expanded connections, please modify the source slightly by making this boolean true :)

    4. Regarding the FSM condition checking, there is already the option to either check the conditions each frame of the state, or check the conditions only once and after the state is finished. Let me know if there some third option you are refering to?

    Thanks!
     
  17. Marble

    Marble

    Joined:
    Aug 29, 2005
    Posts:
    1,268
    Thanks for replying. I do get that my requests make the code less clean. Thought I would try my luck anyway!

    Doesn't OnNodeGUI draw in addition to everything else in the node window? I was hoping not to draw the node's name and to replace the default info with my own word-wrapped version. In the same way, the 'info' for an extended ConditionTask always has "If" in front of it, and I can't change it without changing source.

    As for the FSM, I'm hoping to check conditions at an arbitrary time, not just at the end of the task. Right now, I've made OnUpdate virtual and done this ugly hack in my extended class:

    Code (CSharp):
    1. public class MySpecialState : FSMActionState {
    2.  
    3.     protected override void Enter() {
    4.         base.Enter();
    5.  
    6.         myStaticClass.myStaticEvent += EvaluateConditions;
    7.     }
    8.  
    9.     protected override void Exit() {
    10.         base.Exit();
    11.  
    12.         myStaticClass.myStaticEvent -= EvaluateConditions;
    13.     }
    14.  
    15.     public override void OnUpdate() {
    16.         if (status == Status.Running) Stay(); // overrides parent node check
    17.     }
    18.  
    19.     public void EvaluateConditions( string forInput ) {
    20.         base.OnUpdate();
    21.     }
    22. }
    I'm doing it like this because I may have many state machines with many conditions to evaluate at once and want them all to wait for a global event without aggressive polling.
     
  18. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    :)

    So, here is what is drawn and how:

    The name of the node is drawn if the default node name is not null. This is actully a protected property you can override 'nodeName'. If you return null, the name will not display.

    Then, everything in OnNodeGUI is drawn.

    Then and only IF the node is ITaskAssignable, the assigned task 'info' property will display. The FSMActionSate you are inheriting from, implements ITaskAssignable, thus it displays the assigned task 'info', which task is just an ActionList task. If you instead inherit from FSMState class which is not an ITaskAssignable, you will not get the info, but, I suppose you do want to assign action tasks in your custom state, but just change when transitions are evaluated (?)
    In this case, the infos will show in the node window, but if the reason you want to hide them is simply the fact that its a long list, there is a opion in the editor window to not show the full info, but rather just a short version (disable "Show Task Summary Info").

    Now speaking of your custom state per se. Wouldn't it sufice your need to create a Condition Task which you will assign on the transition(s) and directly check if that 'myStaticEvent' is raised within that condition, instead of making the state evaluate the conditions when the event is raised? Just a thought.
    This way you are reliefed from creating a customized state due to that reason, unless I misunderstood :)
     
  19. Marble

    Marble

    Joined:
    Aug 29, 2005
    Posts:
    1,268
    You didn't misunderstand, in fact I am flattered to have your advice. If I could be any more impressed with your product and service, then I would be!

    Your latter suggestion is probably just as good (and less invasive) than creating a custom state, but it does make me uncomfortable that transitions will then all get polled every frame. I'm creating a text parser, so even if it's just a boolean check, I may have one or two hundred transitions getting checked every frame in multiple state machines. It just feels icky to do it that way when I can just fire an event when I need to do the check just once. Is that too scrupulous? ;)

    Overriding nodeName worked great. Thanks for that!

    EDIT: It looks like the manual resize controls have been disabled in this version of NodeCanvas. Is this going to become a permanent change?
     
    Last edited: Nov 23, 2014
  20. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Thanks a lot for your kind words! :)

    Well, certainly it's a matter of workflow vs performance. It always has been. I personaly lean towards workflow and only if that is nailed, move forward in optimizing. Most of the times you can easily optimize something, but you can hardly change it's core workflow.
    With that said, the options I can see here are the following:

    1. Do it normaly, unless you indeed hit a performance issue depending on the number of FSMs.
    2. I could add an option "Check Manualy" in the transition checking options enum, which will mean that it will wait for you to call CheckTransitions (which will be made public in FSMState class). In effect this will result in abit less hacky custom state:
    Code (CSharp):
    1. public class MySpecialState : FSMActionState {
    2.     protected override void Enter() {
    3.         base.Enter();
    4.         myStaticClass.myStaticEvent += CheckTransitions;
    5.     }
    6.     protected override void Exit() {
    7.         base.Exit();
    8.         myStaticClass.myStaticEvent -= CheckTransitions;
    9.     }
    10. }
    I want to think through this a bit more tommorow (late here) with a bit cleaner mind though and maybe I come up with a better more generic and less intrusive solution hopefully, for using events in this manner.

    (PS: You are making a text parser with state machines?)
     
  21. Marble

    Marble

    Joined:
    Aug 29, 2005
    Posts:
    1,268
    Ha, sort of—I realize that makes me sound insane! This game has a text-adventure-like interface where the user types in commands. Keywords are evaluated in ConditionTasks like "user input contains x, or y, and z, not w"; then a new state with different input criteria is accessed. It's basically a dialogue tree with loads of choices for each node. As the player moves around in scene, different FSMs start. So you could walk up to an NPC, then type "hi" to get a response and "bye" to get another, etc.

    Thanks for pondering a solution to my little problem!
     
  22. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Thats cool. I love adventure games :)

    Let me assume something. You said that you are having a whole lot of FSMs running simultaneously in the scene, which are responsible for when the player inputs something so that he gets the coresponding response.
    But the responses are relative to the area that the character is about, so you could enable the FSMs that are of immediate importance and disable all the rest whenever the character changes 'areas of interest', instead of having them all active waiting for a transition. Maybe you are already doing that, but thought I should ask :)

    In any case, after thinking this a bit more, the final solutions to this if it's still an issue:
    1. Normal. Create a condition that returns true when your event is raised. If you disable/enable FSMs there will not be much of an issue.
    2. Your way. Make a custom node and override OnUpdate so that CheckTransitions is not called continously, but rather call it when your event is raised.
    3. If you don't want to create a custom node, select "Check Manualy" option for transitions in the state. Create a MonoBehaviour attached to the FSMOwner game object. In there create methods that are called back by the FSM (OnStateEnter, OnStateUpdate, OnStateExit) and do something like this:
    Code (CSharp):
    1. public void OnStateEnter(IState state){
    2.     if (state.tag == "manualCheck")
    3.         myStaticClass.myStaticEvent += state.CheckTransitions;
    4. }
    5.  
    6. public void OnStateExit(IState state){
    7.     if (state.tag == "manualCheck")
    8.         myStaticClass.myStaticEvent -= state.CheckTransitions;
    9. }
    The node tag check is made so that you do that only in your tagged states, or else this will take place for all states. Also, tagging the states help you remember which one of them is set to CheckManual.

    For the last 2 solutions you would need a code update to get the "Check Manualy" option or for cleaning up your custom state code. I can send it to you if you want to use that solution.

    Cheers!
     
    Last edited: Nov 23, 2014
  23. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    If the author of a plugin wants to put a plugin on sale, they just have to resubmit at the sale price, and wait for it to get approved by the Asset Store staff.

    If they want to sell it privately elsewhere than the Asset Store, they also can. But they can't sell it for less than the current price on the Asset Store. That's against the rules unfortunately.
     
  24. Marble

    Marble

    Joined:
    Aug 29, 2005
    Posts:
    1,268
    Thanks for breaking this down! You were right that FSMs are enabled / disabled based on proximity, so maybe I'm worrying too much about optimization. Still, I'm making a custom node anyway to extend the GUI stuff, so I might as well just carry on by overriding OnUpdate. I'm really delighted by helpful you've been—I hope NodeCanvas continues to be worth your while for a long time yet; it's an extremely liberating system.
     
  25. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Thank you very much and you are most welcome :)
    If you need any further help down the road just let me know.
    Also let me know on your progress of your adventure game. I've to play a text adventure since space quest :)

    Cheers!
     
  26. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    I've uploaded a new sample GUI prefab for the Dialogue Tree which uses the new Unity's UI system.
    Thus it is now possible to fully customize the looks of the UI to your desires.
    You can download it here.
    It was created and saved with Unity 5.

    Cheers
     
    tomi-trescak and OnePxl like this.
  27. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Hey everyone,
    After some demand on the matter, I've made/updated a seperate threat for the upcomming WIP visual scripting NC extension, which leans towards the steps of the unreal blueprint system. You can find the thread here.
    You are most than welcome to drop your ideas and thoughts.

    Cheers!
     
    Last edited: Nov 29, 2014
  28. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    Hmmm, Freudian Slip?! :D

    (also I took creative liberties, editing that last sentence haha)

    Cheers
     
  29. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Yeah :) Well It's a thread (most likely) :)
    Cheers and thanks
     
  30. tomi-trescak

    tomi-trescak

    Joined:
    Jul 31, 2013
    Posts:
    78
    Nuverian

    Fantastic news on UGUI, was about to post about it here and as usual you are several steps ahead ;) But I have a problem, I don't have the 5.0 installed yet, so I tried to make it run with 4.6 and the prefab is not possible to open. What should I assign to those public parameters to make it run?

    Thanks!
     
  31. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Hello :)

    Here is a screenshot of the hierarchy:

    GUI Hierarchy.png

    The public variables need to be assigned the following:
    Subtitle Group: A root RectTransform that contains the following (speech, name and portrait).
    Actor Speech: A simple Text.
    Actor Name: A simple Text.
    Portrait: A simple Image.

    Options Group: A root RectTransform that contains the following (Options Button and Slider).
    Option Button: A Button that will be used for the options. It is instantiated for multiple options within the parent's space.
    Timer Slider: A Slider (probably without 'handle') that will show the remaining time.

    The hard thing to re-create would be the anchoring for Button and Slider. If you are still having issues I could create a prefab for 4.6 to save you some time.

    (Note: also make sure that the unity UI EventManager is in the scene. The easiest way to create one would be to add any UI element from the 'GameObject/UI' top menu, since Unity will setup one for you automaticaly. Then delete that added UI element)

    Let me know.
    Cheers!
     
  32. Dbone

    Dbone

    Joined:
    Mar 10, 2014
    Posts:
    56
    Hi nuverian,

    I'm super excited about Nodecanvas. Generally I develop using Playmaker which is an amazing tool, but as the project increases in complexity it gets hard to find and keep things organized. The way that Nodecanvas references BT and Playmaker's FSMs is so much easier to follow. It's awesome as well that Playmaker's FSMs don't need to be listening all the time either and can instead be called as needed.

    That said, I saw back on page 4 of this thread the concerns that Castor76 had with performance issues related to hundreds of GO's being instantiated at runtime. Is this issue totally solved now? Can you elaborate a little on how hundreds of GO's won't impact performance?

    Nodecanvas is such a great tool, it makes me want to make games!
     
  33. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Hello dbone,
    I am very glad you enjoy NC's workflow and the PM integration that much :). It always make me happy to hear that.

    To answer you question, performance has drasticaly improved from back then and I can asure you that NC is prety fast. Very few optimizations had to do with gameobjects, since there were other stuff that actuly decreased performance back then and gameobjects had little if not nothing to do with it. Until GOs become an issue, which haven't been for users using NC, there is nothing really to fix there :)
    Justifing this is also very easy by running a simple benchmark script.

    Thanks! NC was made and is already used for various game and non-game projects. So feel free to do just that and create your own games! ;)

    Cheers!
     
  34. Vectrex

    Vectrex

    Joined:
    Oct 31, 2009
    Posts:
    267
    upload_2014-12-9_3-1-51.png upload_2014-12-9_3-16-28.png Hey again. Any word on these two things that have been mentioned as possibly coming?
    - I'd love to be able to set run-time set breakpoints on nodes. Which would pause just this BT and not all of Unity.
    - I also still pine for vertical, snapped wireless nodes with draggable reordering :) Like this without the wires.
    upload_2014-12-9_3-1-51.png
    Basically no wires, with the snapping auto 'tabbing' and filling in gaps. So it infers the connections based simply on order, much like normal code. I actually find all the wiring and spacing out quite tedious and needless really and yes, I know you don't like it ;)
    Actually... a wireless, snapping mode could work with horizontal layout I think..hmm

    - Another small request. An option to always drag the children, instead of holding down shift.

    - Also I love that you can assemble the graph while the game's running, but I can't figure out a way to save in play-mode? For normal components I just right-click 'copy' then stop and 'paste as values', which is a hack, but works. An 'edit in play mode' button like the new Unity 5 mixer would be amazing.


    Edit: Thinking about a horizontal wireless mode...
    If you had this
    upload_2014-12-9_3-16-28.png

    and dragged the 'Selector' node between Condition and Action, it might snap/slide into this position when let go

    upload_2014-12-9_3-22-6.png

    Mousing over anything could show little '+' icons inline to popup the same 'drag wire into blank space' functionality.
     
    Last edited: Dec 8, 2014
  35. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
  36. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Hey,

    It's already possible to add a breakpoint but by the use of the Debug Decorator, but it will be trivial to make possible to add a breakpoint in any node.

    Back when you first told me about the vertical display, I went ahead and started something about it. The thing is that making the current editor behave like that will be impossible without messing up the code a lot, which I don't really want to do. Instead, I've started working on a new editor to display the behaviour tree verticaly back then. This is by far not finished by maybe I can go in and finish it. Again, it's a totaly different editor window, which works alongside with the external inspector. (currently not fancy at all, just a proof of concept)

    Vertical.png


    I've added the "Automaticaly Hierarchical Move" option now ;)

    Regarding saving changing made in playmode, I've never looked at it, but I think it will be almost impossible due to the many things that need to be taken into account. I will be more certain once I actually look at the matter though :)
     
  37. Vectrex

    Vectrex

    Joined:
    Oct 31, 2009
    Posts:
    267
    So cool! That's it exactly. Yeah I figured the way the current editor works really isn't anything like it. Although I think a node editor could do most of the convenience features. eg the way you currently reorder the wires based on X position of the nodes. Swapping the nodes as well would basically make it close to what I mean (possibly with the children).

    The difference between a free form node environment and a strict snapped one is really one of initial preference. I love nodes and the free form placement, BUT I only need to do that rarely, so the default should be strict, with the option of tearing off nodes using wires. Blueprints is the other way round, forced freeform with the (MISSING) option of stricter layouts. This is basically my point about your blueprint system also. Both are needed IMO.
    I THINK they could be in one editor, but as you point out, it's tricky to get a clean design without crowding the interface.

    Exactly the same with text code editors btw. eg WHY can you type literally anywhere? :) Shouldn't the default be you can only type in places that make sense and optionally type anywhere? It's interesting to me that people solve the issues of text based code, by not adding convenience features, but to completely chuck it all out and start from scratch. Bit of an over reaction I think :)
     
  38. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    I like you overal observations, but still using nodes and that freeform placement, means that you can fastly iterate different ideas, keep whole branches disconnected for testing purposes when designing, quickly change root nodes without forcefully changing the layout, and generaly prety much allow freedom in the design process.
    Same goes for your code editor example. Being freeform means that you can prety much make it look more readable to you, instead of being forced into a specific look pattern.
    Then again, I am probably biased by my artistic background :)
     
  39. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    I've just submitted the next version. The christmas sale is still going on though :)
    So here is what's new:

    • More performance and GC improvement.
    • Added 'Duplicate Branch' in right click context menu.
    • Added option to "Automatic Hierarchical Move".
    • Fixed ExecuteFunction task executing a coroutine. Coroutines will work fine now.
    • Fixed iOS errors relevant to Script Control tasks
    • Fixed WPA build errors.

    Speaking of performance, there are various further optimizations that Im working on and if all goes well will be in version 1.6, but I'd like to share what it looks like:

    Here is a test subject Behaviour Tree:

    TestBT.png



    And here is the profiler running 1.000 agents with the above behaviour tree on an i7 920 (2.67GHz), 6GB RAM with these new (not current) optimizations.

    Profiler2.png
    (we are looking at 'BehaviourUpdate'. This is Unity 5)

    Doing a comparison with several other behaviour tree assets on the store, same BT and PC, and if all goes well, the above NC profiler performance is the faster. The 'ms' might go bit higher (still faster) basicaly to support the Dynamic features of NC.

    Cheers!
     
    hopeful likes this.
  40. eridani

    eridani

    Joined:
    Aug 30, 2012
    Posts:
    655
    What's the difference between your asset and Behavior Designer? Are they the same thing, just implemented differently? Both are on sale right now so I'm trying to to choose one. Thanks!
     
  41. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    @eridani
    Both assets allow you to create behaviour trees, but with different tools and features provided, as well as different implementations, yes.
    To be fair though, I would tell you to check both Behavior Designer and NodeCanvas websites and their feature set. We both have a feature comparison chart as well.

    Apart from Behaviour Trees, NodeCanvas includes a seperate FSM as well as a Dialogue Tree System.
    If you have any specific question, by all means do ask.
     
  42. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    I am very glad to say that recently steam released Shroud of the Avatar, the successor of Ultima Online, is using NodeCanvas Behaviour Trees and FSMs
    You can read the showcase on the NodeCanvas website.


    If you haven't yet seen Shroud of the Avatar and you love narrative driven, fantasy sandbox MMORPGs, you definetely need to play this game.
     
    inas and hopeful like this.
  43. inas

    inas

    Joined:
    Aug 2, 2013
    Posts:
    47
    @nuverian wow the game looks so amazing

    if more high profile games using NC, NC surely become much more popular :)
     
  44. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Shroud of the Avatar is indeed a great a game! You should check it out :)
    There are more games and projects that I know of are using NodeCanvas. I will post about them when I am eligible to do so :)

    Cheers!
     
  45. imaginationrabbit

    imaginationrabbit

    Joined:
    Sep 23, 2013
    Posts:
    349
    Hello- I'm a current user of Playmaker and Behavior Designer and I'm looking into using Node Canvas instead of Behavior Designer for behavior trees for stability reasons- I have a pretty good understanding of how to use behavior trees but I'm not a coder- would I be able to create basic NPC ai with Node Canvas + Playmaker without coding?

    Ideally I'd like to use it to replace Playmaker as well but I'm sure I'd have to learn how to code to do that... Thank you for your time-
     
  46. eridani

    eridani

    Joined:
    Aug 30, 2012
    Posts:
    655
    Have you run into instability issues with Behavior Designer? Thanks for any info
     
  47. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Hello,

    Yes, of course you can use NodeCanvas to create AI behaviours.
    Here is a list of all the already included actions and conditions. Furthermore there is a Playmaker integration that lets you use a Playmaker FSM in a NodeCanvas Behaviour Tree or vica versa, and lets you sync variables between the 2 systems.
    Depending on the complexity of the AI you want to create, you might not need to code anything, but certainly if you are after more complex behaviours, coding your own actions/conditions will help you a lot.

    Let me know if you have any questions.
    Cheers.
     
  48. Dbone

    Dbone

    Joined:
    Mar 10, 2014
    Posts:
    56
    Hi nuverian,

    I was going to ask if it's possible to add a duplicate branch option, but I see you're one step ahead of me! :)
    Was wondering though if it's possible to copy and paste branches as well. That would make it easy to consolidate nodes into one graph after it's previously been subtreed (a problem I'm facing).

    Thoughts?
     
  49. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    Hello Dbone,

    Indeed Duplicate Branch is in the submitted version :)
    Yeah, your request is already in the TODO list for the next version ;)

    Cheers!
     
  50. desyashasyi

    desyashasyi

    Joined:
    Nov 22, 2012
    Posts:
    73
    Hi Nuverian, is it possible embedding GA to node canvas? do you have any suggestion? :-D. I am new in GA programming.
     
    Last edited: Dec 16, 2014