Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

[Released] Behaviour Machine - New Visual Scripting FSM + HFSM + BT

Discussion in 'Assets and Asset Store' started by Anderson-Cardoso859, Mar 23, 2014.

  1. Anderson-Cardoso859

    Anderson-Cardoso859

    Joined:
    Mar 23, 2014
    Posts:
    61
  2. TheSin

    TheSin

    Joined:
    Aug 4, 2011
    Posts:
    150
    This looks pretty interesting. Do you have a eta and price?
     
  3. Anderson-Cardoso859

    Anderson-Cardoso859

    Joined:
    Mar 23, 2014
    Posts:
    61
    Hello TheSin,

    My plan is to launch the beta in the asset store with a huge discount (50%) in two weeks. You support me, saves some money and help to build a better product for you; so it's a win-win. All features were extensively tested and are working fine in the last version.

    I don't have a price yet, I'm thinking about 50 bucks for the introductory price, what do you think?
     
    Last edited: Mar 30, 2014
  4. IanStanbridge

    IanStanbridge

    Joined:
    Aug 26, 2013
    Posts:
    334
    This looks interesting especially as it comes with the source so it would be safer to use on consoles than a lot of the dll based tools like it. The only problem with launching tools like this is that there are several tools quite similar and it is difficult to know which one to buy without getting a chance to try them out. I would have no problem spending $50 dollars on a tool like this providing it worked well but most people looking for a visual scripting tool would choose playmaker because it has a lot of reviews and also a lot of plugins available to it.

    I would suggest that firstly you create a video tutorial demonstrating how to build a basic example scene with it so that people can get a better idea of how it works. I would also suggest that in order to ensure you get some reviews and interest early on so that others feel confident purchasing it you do one of the following. Either release a beta version of it marked as not for commercial use on the forums before release so people can try it out , release a free version of it on the asset store that is compiled into a dll and displays a watermark along side your paid version that contains the source code and doesn't display the watermark, or alternatively just have the paid version but set the price very low for example $10 for the first couple of days to encourage some early adopters. It would also be great if you could make your system support playmaker plugins or failing that create a script that could convert them to whatever format your system requires to make it as attractive to people as playmaker.

    One other question about this system is can it work with multiple threads ? Is it suitable for multi core processors ?
     
  5. Anderson-Cardoso859

    Anderson-Cardoso859

    Joined:
    Mar 23, 2014
    Posts:
    61
    Hi IanStanbridge,

    The videos are on the TODO list and they will be released with the plugin.

    As you said, this type of plugin needs some reviews, so I'm afraid to launch two products (free and paid) in the asset store and get some fragmented reviews and users.

    A public beta version with DLLs for non-comercial projects seems a good option for non-programmers users, but I'm afraid (again) that this approach could not be the best to target coders.

    A low price for a couple of days seems interesting! Maybe a combo of an evaluate version (with DLLs) for non-comercial projects + nice introductory price.

    Playmaker plugins are basically custom scripts for playmaker actions. Porting these scripts to Behaviour Machine is a very easy task for a human being; however write a script to do that can be very challenging. I have plan to support the most used plugins in the asset store: iTween, Playmaker, uScript, NGUI... and any other that the community demands. In fact you already can use a Playmaker FSM as a sub-fsm in Behaviour Machine.

    For the time being, Behaviour Machine does not have nodes/actions for multiple threads. You can easily write nodes to start a tree in other thread; but you need to keep in mind that the plugin's states are MonoBehaviours and Unity is single thread.

    Thank you very much for the suggestions :)
     
    Last edited: Apr 1, 2014
  6. TheSin

    TheSin

    Joined:
    Aug 4, 2011
    Posts:
    150
    Seems like a fair price. Playmaker is cool but i think there is room for more tools similar to it.

    My own node based fsm is a tool for coders and is way different to anything else currently out...dont wanna hijack your thread...so get it out, promote it and keep updating with new videos. There are quite a few behaviour trees out there so making some demos, infact demos that stand out will help it alot.
     
  7. Anderson-Cardoso859

    Anderson-Cardoso859

    Joined:
    Mar 23, 2014
    Posts:
    61
  8. ProjectOne

    ProjectOne

    Joined:
    Aug 9, 2010
    Posts:
    442
    best thing you can do is a video tutorial showing how you put together a simple game with this, but not as simple as changing the colour of a cube... more of good examples of practical useful application of the tool and how it will save you time/let you do things without coding... and how to create your own behaviours/states. That's what stops me from buying it
     
    dablue likes this.
  9. Anderson-Cardoso859

    Anderson-Cardoso859

    Joined:
    Mar 23, 2014
    Posts:
    61
    I understand your concerns, I'm currently working in two videos right now:

    One will show you the basics on how to use the plugin, create states, behaviours and how to code your own custom states and nodes.

    And the other one is a tutorial, I will create a complete game from scratch. It will be probably one of the sample scenes that comes with the plugin.

    Please subscribe to this thread, I'll post the videos here when they are ready.
     
  10. ProjectOne

    ProjectOne

    Joined:
    Aug 9, 2010
    Posts:
    442
    excellent keep it up
     
  11. Krizka

    Krizka

    Joined:
    Nov 24, 2013
    Posts:
    1
    Just bought the plugin. It is very cool, just trying yet. Video tutorial is a must.
     
  12. Anderson-Cardoso859

    Anderson-Cardoso859

    Joined:
    Mar 23, 2014
    Posts:
    61
    I'm glad you liked it. As soon as possible I will post the videos.
     
  13. 3D Omelette Studio

    3D Omelette Studio

    Joined:
    Oct 1, 2013
    Posts:
    130
    the title of this thread is a little bit misleading

    "Open Source"

    was expecting a free asset but found out it is a paid asset with a non .dll files hence the title for referring to open code.

    not kool man!, lol

    Usually the term "Open Source" is tide up to "free of charge" asset
    a search with those keywords in unity forum and or google will come up 100% free assets with with source open to the public.

    anyways good luck with your tool.
     
    Last edited: Apr 22, 2014
  14. Anderson-Cardoso859

    Anderson-Cardoso859

    Joined:
    Mar 23, 2014
    Posts:
    61
    A lot of people misunderstand what open source means. Open source does not means free software, they are different things: http://www.gnu.org/philosophy/free-software-for-freedom.html http://en.wikipedia.org/wiki/Free_and_open_source_software

    Thank you,
     
  15. Anderson-Cardoso859

    Anderson-Cardoso859

    Joined:
    Mar 23, 2014
    Posts:
    61
    Hello guys, here is the first video about the Behaviour Machine.
    It's an overview about the basic features of the plugin.

     
  16. 3D Omelette Studio

    3D Omelette Studio

    Joined:
    Oct 1, 2013
    Posts:
    130
    only in your own little world kiddo,

    What you are referring to is a technicality.

    so i guess 100% of the internet users misunderstand what opensource in the software development field really means. right?
    and i assume google searches and unity forum searches results must be all wrong and misunderstood.

    do you know what a "Hot Dog" is?
    lets say you have a restaurant menu and see the "Hot Dog" option . what do you think this actual refers to?
    an actual dog(pet animal) overheated, or ready to mate or perhaps a popular dog?? lol


    hence my previous post stating that your thread title is a little bit misleading which now i know is due of your own inhouse technicality of meaning of things. :)

    if i develop any sort of app, to me it will always be open source as per your technicality meaning, since it is not a compiled binary, i can compile it tho, then ill become closed source, or a "blackbox" and please do not think i am referring to a dark color box when i say "black box". :)

    incase you do not know what a black box is, do a search on google black box in software development

    cheers
     
    Last edited: Apr 25, 2014
  17. Anderson-Cardoso859

    Anderson-Cardoso859

    Joined:
    Mar 23, 2014
    Posts:
    61
    I'm really sorry that the "open source" term has confused you, and given to understand that the plugin was free. You are the first one to complain about that, If more people find that the term is wrong, I can remove without any problem.

    Thanks again,
     
  18. 3D Omelette Studio

    3D Omelette Studio

    Joined:
    Oct 1, 2013
    Posts:
    130
    like i said before,

    in your own little world kiddo.

    good luck with your "Open Source" paid to used tool. lol

    cheers.
     
  19. Anderson-Cardoso859

    Anderson-Cardoso859

    Joined:
    Mar 23, 2014
    Posts:
    61
    Hello Omelette,

    In no way my intention is to sell a paid thing as a free thing, it don't even make sense.

    Just to let you know that I removed the term "open source" from the site, manuals and asset store (needs to be approved).

    I'm really sorry about that, I want to to publicly apologize for that. I was using the term "open source" to meaning that there are no dlls, no black box. But like you said, the term is commonly used to mean other things.

    I don't want to confuse the users.

    Cheers,
     
    Last edited: Apr 25, 2014
  20. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,084
    I bet you can be more impolite and anoying than that @omelette
    Even if you are right (which you are), you lost the point of being so.
     
  21. IanStanbridge

    IanStanbridge

    Joined:
    Aug 26, 2013
    Posts:
    334
    Actually you are both wrong about what open source means for different reasons. Open Source means that the source code is accessible and anyone is free to change and use it for any purpose providing they abide by what ever open source license terms apply. Open Source has no bearing on the cost of something it's just that usually someone makes something open source because they want others to improve it. The majority of open source projects are free with the stipulation that if you modify the code you have to make those changes freely available to others for free or instead pay a license to use and make modifications without having to release those changes back to the community.

    If you say something is open source and don't state what license it uses it means you can do anything you like with it. Since your asset is paid I was assuming what you were trying to say was that providing you pay for it you can then do what ever you like with it.

    You might want to be careful though as in theory that would mean that someone could buy one copy of it and in theory sell a modified version of it themselves although if it was virtually exactly the same unity would probably reject it from the asset store anyway.

    What were you meaning by open source ? If you aren't happy with others using your code in their own assets then it would be far safer to say includes source code instead.
     
  22. Anderson-Cardoso859

    Anderson-Cardoso859

    Joined:
    Mar 23, 2014
    Posts:
    61
    @IanStanbridge
    Thanks for join the discussion, my intention is just to say that you will receive all the source code, just that.

    I follow the Asset Store license, so you can't sell a modified version of my code. Of course that if you are using just a small part of my code (a class or some functions) we can talk about it. If you provide the author it'll probably not be a problem, but you need to talk to me before.

    Another interesting thing, it looks like the Asset Store does note accept GNU licenses: http://unity3d.com/company/legal/as_provider item 5.10.4
     
  23. 3D Omelette Studio

    3D Omelette Studio

    Joined:
    Oct 1, 2013
    Posts:
    130
    that is what i was referring about,

    while i was browsing doing a search for an open source asset this came up, hence what i commented about the misleading title,

    what I recommend to Cardoso, is to announce his assets without the "Open source" title
    just a regular paid asset, then in the item description in what it includes or features to announce it includes the source code instead(no .dll's).

    which i think he meant by it. but because of his title at least to me was misleading.
     
  24. vidjo

    vidjo

    Joined:
    Sep 8, 2013
    Posts:
    97
    Really excited to see where this asset goes.
     
  25. Anderson-Cardoso859

    Anderson-Cardoso859

    Joined:
    Mar 23, 2014
    Posts:
    61
  26. IanStanbridge

    IanStanbridge

    Joined:
    Aug 26, 2013
    Posts:
    334
    Have you tested this with windows phone 8 ? I haven't got a windows phone device but it appears to error in the windows phone emulator. Are you planning to support windows phone 8 ? I think windows phone 8 only supports a subset of the mono classes at present which might be why I was getting errors. Any ideas why it wouldn't work ? I actually only tested it because it looks like for unity 5's different platforms will be using different compilers and I wanted to see if this worked correctly with Microsoft's compiler at present.

    I think this tool will really come into it's own with Unity 5 as since it doesn't use dll's as in theory it should be able to benefit from the new scripting compile options in Unity 5. Also I think webgl doesn't support dll's so this tool looks like the most promising visual scripting tool for unity in future. Also the action state that you added to the fsm's will make it a lot easier for novice users to use especially if you add more video tutorials. Keep up the good work.
     
  27. Anderson-Cardoso859

    Anderson-Cardoso859

    Joined:
    Mar 23, 2014
    Posts:
    61
    Hello Ian,

    Have you tested the WP8 with the last version (0.2.3) of the Behaviour Machine? This last version is working fine using Unity 4.3.4 and visual studio 2012 on the emulator. What erros are your having?

    Thank you very much for your support. I'm trying to give to the Unity community a visual scripting tool that is very fast and works like a native Unity feature.

    See ya,
     
  28. IanStanbridge

    IanStanbridge

    Joined:
    Aug 26, 2013
    Posts:
    334
    Hi Anderson are you using visual studio express 2012 for windows phone ? If I create a new project import the latest version of behaviour machine set your jump example scene as the only scene in the project and select to compile for windows phone 8 I get errors. If I open it in visual studio and debug it with the wp8 emulator I get the following exception. -

    [System.MissingMethodException] {System.MissingMethodException: Method not found: 'System.Reflection.FieldInfo[] System.Type.GetFields(System.Reflection.BindingFlags)'.
    at BehaviourMachine.NodeSerialization.GetSerializedFields(Type type)
    at BehaviourMachine.NodeSerialization.TypeToStringHash(Type type)
    at BehaviourMachine.NodeSerialization.TypeToHash(Type nodeType)
    at BehaviourMachine.NodeSerialization.Load(List`1 loadedNodes, Int32 nodeIndex)
    at BehaviourMachine.NodeSerialization.LoadNodes(GameObject gameObject, INodeOwner nodeOwner)
    at BehaviourMachine.BehaviourTree.LoadNodes()
    at BehaviourMachine.BehaviourTree.GetNodes()
    at BehaviourMachine.BehaviourTree.Awake()
    at BehaviourMachine.BehaviourTree.UnityFastInvoke_Awake()} System.MissingMethodException
     
  29. Anderson-Cardoso859

    Anderson-Cardoso859

    Joined:
    Mar 23, 2014
    Posts:
    61
    Hello Ian,

    I'm using the Visual Studio Express 2012 for Windows Phone.

    Have you changed the WinRTLegacy.dll (http://forum.unity3d.com/threads/223065-Unity-4-3-3-Type-GetMembers(BindingFlags)-crash) in your Unity 4.3.4 instalation?

    I didn't understand why you need to change your compiler for WP8. I'm following this guide https://docs.unity3d.com/Documentation/Manual/wp8-deployment.html, there is no step for changing the compiler in this guide.

    The Windows Store Apps needs to be compiled using the Microsoft's .NET. For now, the Behaviour Machine does not support this platform, I need to rewrite all the reflection API; working on that now!

    Cheers,
     
    Last edited: May 24, 2014
  30. IanStanbridge

    IanStanbridge

    Joined:
    Aug 26, 2013
    Posts:
    334
    Hi Anderson I wasn't aware there was a bug in the latest version of Unity for windows phone 8. I think that Dll you mentioned is the issue not behaviour machine. I'm surprised they haven't patched it yet. Good to hear you are making it support Microsofts .net as well.

    Also a couple of suggestions on how to improve behaviour machine. Firstly would it be possible to have behaviour machine display an icon in the hierachy list so you could easily see which objects had an fsm attached ? You could also perhaps have a higher level window in behaviour machine that only listed the objects with an fsm attached that opened it if selected in that view.

    Another suggestion would be to have comment nodes for your action states so you could include comments in them. It would also be good if you could disable a node in an action state temporarily to assist in debugging a bit like how you can comment out code in a script when trying to fix issues.

    Lastly if you want to get really advanced would it be possible to implement a multithreaded load balancer into behaviour machine. Because in effect a fsm is just a representation of the flow of processing states it would be ideal for implementing multithreading logic. You could have a controller that simply executed an fsm on which ever processor thread was being used the least. You could also have it do parallel execution in the relevant behaviour trees as well.
     
  31. Anderson-Cardoso859

    Anderson-Cardoso859

    Joined:
    Mar 23, 2014
    Posts:
    61
    Hi Ian,

    If you have a fsm or behaviour tree selected, you can right click in the name of the game object on the toolbar of the Behaviour window to get a list of all objects that has a fsm or behaviour tree in it. A higher level window with these objects is a good idea, i will look to that option and to the icon on the hierarchy view.

    Comment nodes are on the way. The problem with the enabled property for nodes is that you need to check this property for every node that need to be ticked, and this property will be changed in the editor only. A workaround is to temporally remove from the hierarchy (set as root) the nodes you wish to disable.

    The biggest issue with multithreading is that you cannot perform actions neither read data from the Unity's objects, so you cannot translate/rotate objects, check their position/direction, change the material properties... Let's see if Unity 5 changes that.

    See ya,
     
  32. RockHornet

    RockHornet

    Joined:
    Sep 2, 2013
    Posts:
    1
    Hi Anderson,
    I'm in the process of buying {b} right now and from what i've seen it's a really exciting product.
    If it's of any help here is why i buy it:
    - It's Open Source (despite what the other guy says you use the term Open Source correctly)
    - It SEEMS simple. Not "playmaker-simple" but "swiss architecture / elegantly simple".
    - It SEEMS more programmer-oriented.
    Now i put an emphasis on "SEEMS" because i don't use {b} yet so i could be wrong.

    If i could give you an advice, wich is a patronizing things to do, it would be to don't try to target the Playmaker "audience"
    Target the "middle-of-the-road" programmer, that know how to script but don't want the hassle to develop a Finite State Machine or a behaviour tree and love the ease-of-use of a visual editor.
    Put the emphasis on the synergy beetween scripts and your visual editor, and the fact that users keep control of what's happening.

    Well now i'm going to use it and i'll come back here to give you my first impression.
     
  33. OnePxl

    OnePxl

    Joined:
    Aug 6, 2012
    Posts:
    307
    But can you have multi-threaded nodes send commands to a normal node to perform transforms for them? Just a question, I have no idea.
     
  34. Anderson-Cardoso859

    Anderson-Cardoso859

    Joined:
    Mar 23, 2014
    Posts:
    61
    Hello Pierre,

    Thank you very much for share your reasons to buy the plugin.
    I'll definitely target the "middle of the road", but I'll not forget designers and artist of course.

    If everything goes fine, the next {b}'s update will be a huge breakthrough compared to the other plugins, thanks for a good idea of one of the users.

    I'm looking forward to your feedback! Any help you need you can count on me.

    Cheers,
     
  35. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,204
    I was wondering how to create a custom event in the plugin? I know you call the SendEvent in code, but I don't know how to create a custom event in the editor.
     
  36. Anderson-Cardoso859

    Anderson-Cardoso859

    Joined:
    Mar 23, 2014
    Posts:
    61
    Hi OnePxl,

    Well, if your normal node will run in the main thread then this is possible.

    But you need to remember that you need to read data (from the game world) and perform actions (on the game world) only in the main thread. Then, you will need to sync a lot of data between these threads, this is another big issue.
     
  37. Anderson-Cardoso859

    Anderson-Cardoso859

    Joined:
    Mar 23, 2014
    Posts:
    61
    Hello Ben, what do you mean by custom event?

    You can add new events to the blackboard like any other variable. The new event will be shown in the blackboard and you can copy its id to send it in the script.

    Every event is an instance of the FsmEvent class. If you are talking about create your own event class, this is not possible yet, but will be in the future...

    Cheers,
     
    Last edited: May 29, 2014
  38. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,204
    The blackboard looks like what I was looking for.

    Regarding SendEvent(), and state transitions within a HFSM. Let's say I have two HSFM nodes with hierarchies like this:

    1) MenuState
    a) MenuState > LevelSelectMenu
    b) MenuState > OptionsMenu

    2) LevelState
    a) LevelState > GamePlaying
    b) LevelState > GamePaused

    Is it possible to transition from a substate of one FsmBehaviour to the substate of another FsmBehaviour? Or am I approaching the transitions wrong?

    For example, I want to go from the 2b) LevelState > GamePaused to 1a) MenuState > LevelSelectMenu.
     
  39. Anderson-Cardoso859

    Anderson-Cardoso859

    Joined:
    Mar 23, 2014
    Posts:
    61
    Hi Ben,

    You cannot create transitions between states that does not have the same parent FSM.

    But you can send events to any other states, so you can send an event from the LevelState > GamePaused to the MenuState HFSM that will enable the MenuState > LevelSelectMenu state. If you want to disable the LevelState > GamePaused you need to send another event that will enable another state or you can disable the LevelState FSM:

    Code (csharp):
    1.  
    2. // The code below will disable the fsm state
    3. fsm.enabled = false;
    4.  
    I hope this helps. Chrees,
     
    Last edited: May 29, 2014
  40. Anderson-Cardoso859

    Anderson-Cardoso859

    Joined:
    Mar 23, 2014
    Posts:
    61
    Hello guys,

    A new version of Behaviour Machine is live on the asset store: http://www.assetstore.unity3d.com/en/#!/content/16224

    Here are the release notes:
    - NEW: More sample scenes.
    - NEW: FsmBehaviour and BehaviourTree description.
    - FIX: Running status on FunctionNodes.
    - FIX: Support for Unity 4.5.0.

    Have fun :-D
     
  41. Anderson-Cardoso859

    Anderson-Cardoso859

    Joined:
    Mar 23, 2014
    Posts:
    61
    Hi guys,

    A new version of Behaviour Machine (0.3.0) is live on the Asset Store.

    Release Notes:
    - IMPORTANT: Upgrade from older versions will lose the variables from all Blackboards D:
    - NEW: Mecanim parameters as variables!
    - NEW: Redesigned GUI control for variables, no more Radio buttons.
    - NEW: Selected variable shows up on combobox.
    - NEW: Options to find and edit nodes script in the gear.
    - NEW: Shader get/set nodes.
    - NEW: Comment node.
    - NEW: Per Second property in some math nodes.
    - NEW: Copy/Paste/Cut/Duplicate/Delete keyboard shortcuts for ActionState and BehaviourTree nodes.
    - NEW: Duplicate keyboard shortcut for states.
    - NEW: Custom icons on the inspector (thanks to Macário).
    - NEW: Redesigned sample scenes with description for all states.
    - FIX: Improved node serialization!
    - FIX: Improved node editor.
    - FIX: Improved GUI nodes.
    - FIX: Improved state Copy/Paste/Delete: copying/deleting FSMs will include its hierarchy, transitions will keep their relative info.
    - FIX: Game GUI controls did not appear when there is no Behaviour window.
    - FIX: TypeUtlity and EditorTypeUtility TypeInfo conflict (thanks to Tiaan Geldenhuys).
    - FIX: FSM's start state and AnyState loses references on play mode.
    - FIX: Array size less than zero.
    - FIX: Cancel edit node name in Behaviour window.
    - FIX: Using UnityEditorInternal.ReorderableList on the ActionStateEditor, Unity 4.5+.

    This is the plugin's biggest update so far. I think it is worth to share with you the most important features:

    1 - No more Radio buttons, you can select options for the properties using a unique popup button with icons. It is more intuitive, easier to use and beautiful:

    93.jpg


    2 - You can access Mecanim parameters through properties. This avoids you to create a lot of get/set nodes when working with an Animator:

    mecanim_parameter.gif

    3 - If you are a programmer working with designers, then you will love this last one...
    You can create your own custom variable/constant. You can't share this variable in a Blackboard yet, but you can override the get/set Value property to do what you desire.

    Below is an example of a custom variable that let you use the position of an object in any node property that you can use a Vector3 variable:

    Code (CSharp):
    1.  
    2. using UnityEngine;
    3. using System.Collections;
    4. using BehaviourMachine;
    5.  
    6. [System.Serializable]
    7. [CustomVariable("Transform")]
    8. public class MyCustomVariable : Vector3Var {
    9.  
    10.     [Tooltip("The target Transform")]
    11.     public Transform transform;
    12.  
    13.     public override Vector3 Value {
    14.         get {return transform.position;}
    15.         set {transform.position = value;}
    16.     }
    17.  
    18.     public MyCustomVariable () : base () {}
    19.  
    20.     public MyCustomVariable (GameObject self) : base () {
    21.         this.transform = self.transform;
    22.     }
    23. }
    24.  
    Here is how you use your custom variable in the nodes:

    custom_var.gif


    Don't forget to create a backup of your project before upgrading.
     
    Last edited: Jul 6, 2014
  42. Anderson-Cardoso859

    Anderson-Cardoso859

    Joined:
    Mar 23, 2014
    Posts:
    61
    Behaviour Machine 0.4.0 is live on the asset store.

    Release Notes:
    - NEW: BehaviourTree's execution was redesigned; following common conventions. See AIGameDev (http://aigamedev.com/).
    - NEW: New Node API, with new virtual methods (OnEnable, OnDisable, Start, End, Update). ICallbackNode was removed.
    - NEW: Wait, PrioritySelector, PrioritySequence, RandomSelector, RandomSequence nodes.
    - NEW: New BehaviourTree's and ActionState property (resetStatusOnDisable).
    - NEW: The Update node in the ActionState was replaced by the EveryFrame node.
    - NEW: Add transition popup with options for set event.
    - FIX: Loop execution with composite nodes with running child.
    - FIX: Improved runtime performance on OnMouseStay, Update, FixedUpdate, LateUpdate, OnTriggerStay/2D, OnCollisionStay/2D, OnMouseDrag nodes.
    - FIX: Improved loading nodes on BehaviourTrees.
    - FIX: Improved BehaviourTree's runtime performance (lightning fast).
    - FIX: Improved CompositeNode Add/Remove/Insert methods.
    - FIX: Reset node on inspector view.
    - FIX: IsAllBoolTrue and IsAnyBoolTrue error.
    - FIX: Removing m_InstanceID warnning on WP8 build.

    Another big update!
    The most important feature is the new Node's API, simple to extend and easy to understand:

    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3. using BehaviourMachine;
    4. public class CustomNode : ActionNode {
    5.    
    6.     // Called when the owner (BehaviourTree or ActionState) is enabled
    7.     public override void OnEnable () {}
    8.  
    9.     // Called when the node starts its execution
    10.     public override void Start () {}
    11.  
    12.     // This function is called when the node is in execution
    13.     public override void Update () {
    14.         // Do stuff
    15.        
    16.         // Never forget to set the node status
    17.         status = Status.Running;
    18.     }
    19.  
    20.     // Called when the node ends its execution
    21.     public override void End () {}
    22.  
    23.     // Called when the owner (BehaviourTree or ActionState) is disabled
    24.     public override void OnDisable () {}
    25.  
    26.     // This function is called to reset the default values of the node
    27.     public override void Reset () {}
    28.  
    29.     // Called when the script is loaded or a value
    30.     // is changed in the inspector (Called in the editor only)
    31.     public override void OnValidate () {}
    32. }
    More info: http://www.assetstore.unity3d.com/en/#!/content/16224
     
  43. Anderson-Cardoso859

    Anderson-Cardoso859

    Joined:
    Mar 23, 2014
    Posts:
    61
    Hi guys,

    I have started a series of tutorials that will show you the basics about the plugin.

    Here is the first video:



    I'll hope you enjoy.
     
  44. sledgeman

    sledgeman

    Joined:
    Jun 23, 2014
    Posts:
    389
    Your Plugin look really well thought. And it seems that Designers could create needed actions with it (as shown in your 01 Basics Video). Would be great if you can make more tutorials to show its power. For example how to drag objects, look / target to object and so on. Maybe you can provide a Demo, to test it out. Cheers...
     
  45. Anderson-Cardoso859

    Anderson-Cardoso859

    Joined:
    Mar 23, 2014
    Posts:
    61
    Hi sledgeman, more videos are on the way. I'm also working on an evaluation version of the plugin.
     
  46. sledgeman

    sledgeman

    Joined:
    Jun 23, 2014
    Posts:
    389
    Thats cool. Thank you. I think all users would like to test it out :)
     
  47. PrimeDerektive

    PrimeDerektive

    Joined:
    Dec 13, 2009
    Posts:
    3,086
    I've been looking for an asset that would let me code the behaviors of my AI states myself, but have a visual scripting component to handle the organization of the state machine and transitions. From the sound of it, Behavior Machine is what I'm looking for, but your single example is just moving a box and done entirely from the node editor.

    Is there plans to add more videos or written tutorials, possibly an example project, of the FSM stuff? You'll have another customer then.
     
  48. Anderson-Cardoso859

    Anderson-Cardoso859

    Joined:
    Mar 23, 2014
    Posts:
    61
    Hi PrimeDerektive,

    I would love to have you as a costumer ♥

    I'm finishing more two videos from the Basics series and I'll start working on the Scripting video series this weekend. I'll post the videos here when they are ready.

    One of the goals of the Behaviour Machine is to let programmers code their own state machines and behaviour trees using a robust API, fully extensible and a very powerful node editor.

    More about the API: http://behaviourmachine.com/ScriptReference/
     
  49. PrimeDerektive

    PrimeDerektive

    Joined:
    Dec 13, 2009
    Posts:
    3,086
    So yeah I bought it a few minutes after my last post ;) you should mention somewhere other than the very last photo in your asset store gallery that you provide a bunch of nice example scenes.

    I figured out how to do what I was attempting within 20 minutes; the "Move the Ball" example is especially nice because it provides examples of state machines with both ActionStates and custom-coded StateBehaviours. I LOVE this asset. Also I had no intention of using the behaviour tree stuff, but after monkeying around with some of them they prove to be very robust, I will find some use for them yet.

    One thing I noticed: I'm not sure why you'd want to use MonoBehaviour MonoStates over simply inheriting from StateBehaviour, but if you did want to, you make it very difficult because you have to drag the MonoBehaviour from the object to the exposed MonoBehaviour field of the MonoState, but the inspector is already occupied inspecting the MonoState. This means you have to open a new inspector window and lock the other one; cumbersome. It'd be nice to have that dropdown populate with already-attached MonoBehaviours or something.
     
  50. Anderson-Cardoso859

    Anderson-Cardoso859

    Joined:
    Mar 23, 2014
    Posts:
    61
    Thank you very much for buying, and welcome to the {b}

    Yep, there are a lot of key features and gems that are hidden. I'm still learning from you guys, and changing these things. So, any hint and/or help is very welcome.



    The behaviour tree is very useful when you need to use priority behavours in your A.I. Take a look in this video and you will get the general idea: http://aigamedev.com/insider/presentations/behavior-trees/

    Well, you found another hidden gem: Sometimes you don't have access to the script (they are inside a DLL), so you have no choice, you should use a MonoState. For example, if you are working with PlayMaker then you cannot inherit from StateBehaviour. But you can use the MonoState to control the PlayMakerFsm component as a regular state inside {b}, this lets you use a PlayMakerFsm as a sub-fsm of your state machine.

    Wow, you are totally right. I'm adding this new feature to the TODO list.

    Thanks again,
     
    Last edited: Jul 9, 2014