Search Unity

Opinions Please (New Tool)

Discussion in 'Works In Progress - Archive' started by WJ, Jul 14, 2015.

  1. WJ

    WJ

    Joined:
    Oct 25, 2012
    Posts:
    97
    Hi all,

    So I've been working on this tool for a very long time, it's slowly approaching completion. Just a few more small features to implement around actors and formulas. I wont go into detail about the aim of the tool but I'll just say it's not another RPG centric game tool.

    Anyway onto why I am here.

    Having used several asset store plugins in the past for visual programming I found that 1 is not enough, I find my myself using several different tools when doing everything in code, FSM + BT and in some cases flow's come in handy (ie. event driven programming).

    So I have implemented all 3 in my new tool however I'm having a hard time deciding how the blackboard system should really work. Right now my tool only shows the black board if you have prefab or scene object with a (bt/fsm/flow) controller attached to it that has the blackboard component. This has it's drawbacks though because you can nest Flows and FSM's in the BT and you can even execute BT's from Flows.

    So in reality if you select a component that has a BT + nested FSM in it when you navigate to the FSM tab all you wont be able to select from the blackboard dropdown instead you have to type the values in. This does not break anything because once the FSM is attached those inputs turn into drop downs and you can even click a button to generate any missing variables for the blackboard after you import an FSM or Flow.

    My idea was to only enable Flow by default in the editor then you right click and import a BT or FSM and you can use a flow event to trigger those. This way there would be much less confusion, this would look like the below outline:

    Flow -> BT -> FSM
    Flow -> FSM

    Flow can execute a BT and BT can execute FSM's
    Flow can also execute an FSM
    BT and FSM can not import and execute Flows

    Some screen shots:

    This is a flow, there are many entry points like keyboard/update/fixedupdate/lateupdate/events and many more.
    the idea is you use one of those to execute an FSM or BT, FSM and BT's are of course re-usable, they are separate scriptable objects.
    Screen Shot 2015-07-14 at 06.57.59.png

    This is an FSM, They have entry and optional exit points for auto disabling an FSM or when nested in a BT let the BT know that the FSM has finished running. The transitions are conditions and can be stateful or conditional, you set these up by clicking on them.

    Screen Shot 2015-07-14 at 06.58.21.png

    This is a behaviour tree, as you can see I have a parallel composite that is driving several FSM's at the same time.

    Screen Shot 2015-07-14 at 07.21.49.png

    This is what you see when you double click on an FSM or Flow inside the BT, it drills into it and you can edit and select variables from the blackboard, this is where keeping them as separate tabs in the tool breaks down, in this tab I can select the variables because a BT Controller + Blackboard is attached to a prefab, however if I go to the FSM Trees tab and select the Player Shooting FSM those variable drop downs will turn into text, which again breaks nothing because I can create an FSM controller, add this FSM to it and click a button and all the blackboard entries will be generated for me, however I'm not a big fan of this.

    Screen Shot 2015-07-14 at 07.27.46.png

    Here you can see the variable turns back into a string...

    Screen Shot 2015-07-14 at 06.59.31.png

    Your idea's and input would be appreciated :) I'd like to get this tool done, I'm so close now... I have a working demo etc all the graphs work well just a few more things to get done then it's docs and tutorials.

    Thanks
     
    Last edited: Jul 14, 2015
  2. Wickedfast-Solutions

    Wickedfast-Solutions

    Joined:
    Jan 1, 2015
    Posts:
    18
    Hi WJ,

    Is this new tool something that you will be making available?

    Is there a demo of the tool to try?

    Did you create all the widgets yourself or did you use pre-existing widget packages for the FSM, etc?

    Anyways, Looking at Screenshot 1...

    I see a while loop construct!

    Maybe this makes complete sense in the context of what you are trying to accomplish.. However, visual tools that try to replicate programming language features: iteration, conditionals, etc, are usually missing the point.

    The point (in my opinion) of a graphical tool is to allow the user to interact with systems at a higher level then code.

    For example, in the case of a Domain Specific Language you might present to the user a textual interface for buying
    and selling stocks. The language might have keywords such as buy and sell and dollars. So that valid statements in the
    language might be.

    buy 20 MSFT at 55 dollars
    sell 10 MSFT at 24 euro

    The program itself would interpret these statements to actually buy and sell stocks.

    So, pretty much, from what I can see you are creating a visual programming language.

    What does this generate on the back-end, c# code?

    Maybe your docs and tutorials will make more sense.

    I like all the widgets, they look very professional.
     
  3. WJ

    WJ

    Joined:
    Oct 25, 2012
    Posts:
    97
    Thanks for your feedback :)

    Yes it's a tool I will be releasing, I guess I will explain a little bit about the tool and what I am aiming for.

    It's a generic engine that provides the programmer with the tools needed to create complex games.

    What you will get:
    • FSM Tree
    • Flow Tree
    • Behaviour Tree
    • Write actions, flows, composites pretty much all node types along with included nodes.
    • Manage Inventory, rarities, item categories, items, loot tables
    • Manage Stats
    • Build complex formulas using curves and a node system, access to attributes, level etc and maths nodes
    • Manage factions, classes, actor categories and actors.
    • A zone creation system, lets you create polygon based zones with events like inside/exit/enter etc. You can use these events to trigger behaviours to play audio, start/stop behaviours, spawners etc, works similar to how you trigger events from the unity ui event system but you are not restricted to square, rectangular or spherical shapes.
    • Everything is stored as scriptable objects, only the root object is scriptable, all the children and data use generics and are serialized as XML, for instance BehaviourTree is a ScriptableObject however all the nodes, variables etc are all using generics.
    • Lists and pretty much any type of object including all unity objects can be stored as variables in your blackboard or used as variables in your nodes BBParameter<float> myParam. You will be able to assign a value manually or select from the blackboard.
    • There are no rules to follow, mix and match as you see fit for your game, No predefined parameters like health, level etc. You can define whatever you need for your game and use them in formulas, nodes etc.
    The difference here is I provide no movement scripts, cameras etc. As an example if you want to manage NPC's as in the screen shot below, you simply create a class that extends the build in Actor abstract and you can now create and edit actors in the tool, assign behaviours to them, attributes and whatever else you want to expose.

    There are no restrictions, you can create anything from a soccer game to an RPG, I will be including networking nodes and also a basic save system you can extend.

    Some more screen shots:

    Rarity:

    Screen Shot 2015-07-14 at 19.42.50.png

    Attributes:
    You will be able to create classes that extend attribute and add/edit them here, this is the base attribute

    Screen Shot 2015-07-14 at 19.43.05.png

    Inventory Categories:
    You will be able to create classes that extend Category and add/edit them here, this is the base category

    Screen Shot 2015-07-14 at 19.43.14.png

    Items:
    This one shows an example of the scripts, on the left I have consumable type and equipable type, however I can add more easily by extending ItemType, you will be able to attach a behaviour and edit it's parameters in here as well.

    Screen Shot 2015-07-14 at 19.43.25.png

    This is how you add a new item, you select the type and drag a prefab in and it will be created and added to the database folder where you can drag/drop it into your scene to use.

    Screen Shot 2015-07-14 at 19.43.40.png
     
    Last edited: Jul 14, 2015
  4. WJ

    WJ

    Joined:
    Oct 25, 2012
    Posts:
    97
    This is the curve editor, with generation, randomness etc. These can be used in the formulas node graph or stand alone in your code etc.

    Screen Shot 2015-07-14 at 19.43.54.png

    Actor Factions, you will be able to create different faction types by extending factions or use the default shown here.

    Screen Shot 2015-07-14 at 19.44.08.png

    Actors, this works the same as items, you can create new actor types that extend actor and as visible below you can assign a behaviour and edit it's parameters for just that actor, these are the parameters of the blackboard for the behaviour that is unique to the actor.

    Screen Shot 2015-07-14 at 19.44.21.png

    This is how you add a new actor, select the type and drag the prefab in, then you can edit the build in settings + your own custom settings.

    Screen Shot 2015-07-14 at 19.44.31.png
     
  5. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,536
    It looks interesting, I'm not super clear on what it can do though. Some videos might clarify that.
     
  6. WJ

    WJ

    Joined:
    Oct 25, 2012
    Posts:
    97
    I will post an example video of one of the unity demos I'm working on it's still early stages but movement is working I am extending the unity demo to show NPC's, Monster AI and other features or the framework, it's pretty much a tool that lets you organise code, build reusable nodes for usage in the visual programming editors, build reusable graphs and much more.

    You will most likely need to code stuff, camera, either code or design your character control system in the visual designers and more.
     
    Last edited: Jul 14, 2015