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

Assets diamond Visual Scripting

Discussion in 'Works In Progress - Archive' started by maz_dev, Jun 17, 2017.

  1. eggeuk

    eggeuk

    Joined:
    Sep 1, 2013
    Posts:
    88
    Yes I thought about the generated terrains and a player running from one to the other.
    A runner gots to the border of one generated terrain and runns to the next linked terrain, and so on.
    The terrains should have a soft passage, should merge to each other.

    In this way there could be build an endless runner game.
    Or just used for building a greater plane with generated terrestrial highlights as like mointains and holes.
     
  2. maz_dev

    maz_dev

    Joined:
    Sep 23, 2012
    Posts:
    261

    terra is an editor only tool to help to generate terrains fastly. endless terrain generation could be done in another diamond extension specialized in endless running games or endless landscape games. The way terra generates its terrain is not optimized to the runtime use.
     
  3. eggeuk

    eggeuk

    Joined:
    Sep 1, 2013
    Posts:
    88
    Thanks maz_dev, I understand.
     
    maz_dev likes this.
  4. Barada

    Barada

    Joined:
    Apr 27, 2015
    Posts:
    99
    when a variable is "made public" so it appears in the inspector. the variable name can be very long as it includes the graph and logic name. is it possible to reorder this in the inspector, so it either only shows the node name, or at least shows it first. i need to resize inspector far too much in order to see the actual name that i need to see.
     
    Last edited: Nov 25, 2017
    eggeuk likes this.
  5. eggeuk

    eggeuk

    Joined:
    Sep 1, 2013
    Posts:
    88
    I'm just finished a Player Controller and a FPS Camera.
    All works fine and I would like to show the camera graph to the forum members.

    It would be nice if we could have a place - maybe another thread - for showing the work members have done.

    I used C#-scripts and translated them to DVS Graphs. The pictures will show the process.
    Maybe the graph could be done in an different way, perhaps in two states, one for building the offset and one for runtime conditions. But I tried to do it like the C# script.

    Have fun, hoping you can use it.
    And one question. What are your experiences in translating your thoughts to DiamondVS?
     

    Attached Files:

  6. eggeuk

    eggeuk

    Joined:
    Sep 1, 2013
    Posts:
    88
    Of course here the Player Controller.

    I have used node 'Get Axis No Cross Platform', because I have done some testing directly in DVS Graph Editor. Node 'Get Axis' should work too but only at runtime conditions.

    A little bit difficult is finding the Axis Names. I had to look up the Unity documentation. A pull down list would be helpful, but that's not really a problem.
     

    Attached Files:

    Last edited: Nov 25, 2017
  7. maz_dev

    maz_dev

    Joined:
    Sep 23, 2012
    Posts:
    261
    An option in diamond is coming, this option let you define a name for a variable when you want to change it to public
     
    Barada likes this.
  8. maz_dev

    maz_dev

    Joined:
    Sep 23, 2012
    Posts:
    261
    @eggeuk thank you very much, this is a great work for us and the community, we are thinking to do another thread but probably a diamond website for blog, share, and news etc..

    Maybe you know this but I will explain who to show unity input axis
    in a unity project (the unity input manager) so it can be helpful for others:

    in the unity input manager you can add a new axis even you can change the name and properties of an existing axis. Due to the dynamic nature of unity axis names, diamond logic node let you enter the name and the node tell you if the axis name exists in the unity input manager.

    dialondAxsisName.png

    accessInputUnity.png
    unityInput.png
     
  9. eggeuk

    eggeuk

    Joined:
    Sep 1, 2013
    Posts:
    88
    Some Test for using 'TransferredData'. All is fine but, maybe a bug with 'string'.

    The variable with type 'float' and 'int' work fine. Changing a float number within node 'DATA_IN' is shown in node 'RECEIVE_DATA01'. It works immediately when the graph is in run mode and nodes set to 'Always Doing'.

    You can even change the variable typ, maybe from 'float' to 'int', binding the conectors when being gone by typ transfer and left data name as it is, the input data is shown.

    But that does not work with 'string' typ! As shown in picture no text is reseived. 'Default Value' is shown.
    Study_TransferredData_Float_OneGraph.PNG Study_TransferredData_String_OneGraph.PNG
     
    Last edited: Nov 27, 2017
  10. eggeuk

    eggeuk

    Joined:
    Sep 1, 2013
    Posts:
    88
    I tested 'transferred Data' across two Node-Graphs within one state of a state graph.
    One graph is called '1' and the other one '2Back'.

    At testing the execution flow and 'transferred data' is going from node graph '1' to node graph '2Back' without problems, the data is shown. But no data is coming back from graph '2Back' to graph '1'.

    Maybe I already do not understand execution flow and DiamondVS looping. If a node graph is in run mode and the nodes are in 'Always Doing It' all nodes are executed for ever - that works. But how about two and more node graphs. Does the first one starting automaticaly if the last node graph is finished?

    As I think:
    If a state has more than one node graph, the first one is executed with his nodes, followed by the next and all the others that may follow with their nodes. A big loop going through all node graphs and their nodes.

    Execution flow breaks if a node 'Goto To State' is used: The old state stops and the new one is starting with it's node graphs.

    In my test:
    The transferred data between two node graphs within one state should go frome node graph one ('1') to node graph two ('2Back') and automaticly starting again node graph one ('1').

    Then in node graph one again there shold be shown the result coming by transferred data frome node graph two. The 'comming back data' within graph one should be changing if the input in node graph one typed newly.

    What's wrong?

    Study_TransferredData_TwoGraph_1.PNG Study_TransferredData_TwoGraph_2Back.PNG
     
    Last edited: Nov 27, 2017
  11. maz_dev

    maz_dev

    Joined:
    Sep 23, 2012
    Posts:
    261

    You are right, there was a bug related to the transfer data when it is a string, the bug exists only in editor mode, but fortunately, the generated scripts works fine. I corrected the bug for the editor mode and correction will be available in the next diamond version.
    Thank you eggeuk to point it out :)
     
  12. maz_dev

    maz_dev

    Joined:
    Sep 23, 2012
    Posts:
    261
    Hi eggeuk, I didn't understand all the details of your explanation, but I think that your reasoning is based on assuming all graphs and states runs in editor mode together.
    The matter is that in editor mode only opened logics runs.

    Differently, In run mode (generated scripts), you have only one state activated (FSM principle), all logics and logicNodes of this state runs forever, like encapsulated for loops, because logicNodes are encapsulated inside logics.
    The go to state logicNode deactivates the last activated state and activates the targeted one.

    About "transfer data system" (TDS) in the editor mode:
    When you have 2 graphs (sendGraph and receiveGraph). You have to enter a logic in the sendGraph in which you create a send data logicNode (send me as transferred data), you run your logic and you click on do-it on your sender logicNode, so your data is sent.
    Now you load the receiveGraph in diamond, and in a logic in it, you create a receive logicNode (listen to transferred data), you run your logic and you click do-it to receive the data from the sendGraph.
     
    Last edited: Nov 28, 2017
  13. eggeuk

    eggeuk

    Joined:
    Sep 1, 2013
    Posts:
    88
    High,
    the nodes for incrementing an int have a strange behavior with their variables.

    It seems the two 'IncrementStatic'-nodes use the same int-variable.
    Each 'Do It' released on one of these nodes has an effect to the other one.

    Node 'Increment' has it's own int-variable, not effecting the other two nodes.

    I'm not really sure if it's a bug or a feature.
    But I think each nodes should have it's own private data.
     

    Attached Files:

  14. maz_dev

    maz_dev

    Joined:
    Sep 23, 2012
    Posts:
    261

    Hi eggeuk,

    You are right, the 'IncrementStatic' logicNodes share the same variable.

    Otherwise, the 'Increment' logcNode has it's own variable per logicNode.

    the 'IncrementStatic' logicNode is useful when your generated script is attached to a game object that has to count something for your game, but this game object can be destroyed and replaced by another having the same script, so the new game object can continue counting without losing the variable value.
     
  15. starikcetin

    starikcetin

    Joined:
    Dec 7, 2017
    Posts:
    335
  16. maz_dev

    maz_dev

    Joined:
    Sep 23, 2012
    Posts:
    261
    rahuxx likes this.
  17. starikcetin

    starikcetin

    Joined:
    Dec 7, 2017
    Posts:
    335
    I can't promise due to my busy college schedules, but if I can find some free time I would love to give you some feedback.
     
    maz_dev likes this.
  18. Barada

    Barada

    Joined:
    Apr 27, 2015
    Posts:
    99
    We`ve also been looking at using xnode here at mjolnir software. would be very interested in your thoughts and findings using the api,
     
    maz_dev likes this.
  19. maz_dev

    maz_dev

    Joined:
    Sep 23, 2012
    Posts:
    261
    Yes it is a well done project and we try to watch it's evolution and be inspired by his way doing things to enlarge more and more diamond's power.
     
    starikcetin likes this.
  20. Guigui_White

    Guigui_White

    Joined:
    Nov 1, 2017
    Posts:
    10
    Hello, is your addon supporting the trigger modification of the animator ?
    If no, will you add this feature ?
     
  21. maz_dev

    maz_dev

    Joined:
    Sep 23, 2012
    Posts:
    261
    Hi Guiguik, did you mean the unity animator component and the mecanim system, if so yes, diamond will cover that.

    If you have some special need you can send us a mail to
    mezanixissa@gmail.com
    and maybe we can offer you a fast solution before that diamond implements the whole features related to the animator component
     
  22. Guigui_White

    Guigui_White

    Joined:
    Nov 1, 2017
    Posts:
    10
    Yes, I’m talking about the mecanim system. I’m really pressed to see this feature because this is the only one I need (actually)
     
    Last edited: Dec 30, 2017
  23. maz_dev

    maz_dev

    Joined:
    Sep 23, 2012
    Posts:
    261
    Okay dude we will try to bring up the mecanim system in diamond as soon as possible
     
  24. Guigui_White

    Guigui_White

    Joined:
    Nov 1, 2017
    Posts:
    10
    Thank you ^^
     
  25. atmoruku

    atmoruku

    Joined:
    Dec 11, 2017
    Posts:
    7
    hi I am new to game development and currently 3d endless runner project something close to the likes of subway surf...... and it just so happened that the only problem that I have encountered is coding although I know my c# basics but coding is a whole different ball game I am very familiar with the unity interface as I been playing with it for a while now and done some scripting with the help of tuts like player movement, and coin system, menus and so on so my questions are:
    1. can I use diamond for scripting my whole game with just diamond for the scripting the game........
    2. are there any references that would help me in my quest or any prior knowledge I need before I start using diamond
     
  26. Guigui_White

    Guigui_White

    Joined:
    Nov 1, 2017
    Posts:
    10

    I think you can use diamond for script your whole game. Diamond just missing the collision and trigger management and the animator component supporting. But these components can be replaced by other feature that you can find in diamond.

    The knowledges you need is the logic and how to use diamond (you can find 3 videos on youtube who explain the system but it’s very easy to discover alone how it work)

    So let’s start now !​
     
    atmoruku likes this.
  27. atmoruku

    atmoruku

    Joined:
    Dec 11, 2017
    Posts:
    7
    thanks a lot I will start exploring these new year gift...blessings to the developers
     
  28. maz_dev

    maz_dev

    Joined:
    Sep 23, 2012
    Posts:
    261
    thank you for being interested in diamond.

    Thanks for explaining diamond features, indeed, diamond for now lacks in triggering and collision, but actually we can use the following:

    Create a new logic node in which choose:
    Compute or operation for Logic
    Game Object for variable type
    and in compute you will have the following list to detect neighbor game objects. this node uses raycasting which can be less accurate than triggers and contacts of unity colliders, so we want to bring to diamond these unity functions: OnTriggerEnter/StayExit and OnCollisionEnter/Stay/Exit
    as soon as possible

    Image 1.png

    We will try to bring contact and animation features to diamond as soon as possible because they are important.
     
    Last edited: Jan 2, 2018
  29. atmoruku

    atmoruku

    Joined:
    Dec 11, 2017
    Posts:
    7
    this is the problem I'm getting here please can I be told what I'm getting wrong
    then while working on my project can I use my own OnTriggerEnter script from an external script without tampering with the diamond scripts on one game object

    and I still find the terms rather confusing I guess the only way around that is practice to get perfect right?
     

    Attached Files:

  30. atmoruku

    atmoruku

    Joined:
    Dec 11, 2017
    Posts:
    7
    maybe I'm attaching the script wrongly
     
  31. atmoruku

    atmoruku

    Joined:
    Dec 11, 2017
    Posts:
    7
    I might be disturbing too much sorry guys....

    when I start up a new scene my diamond graph remains the same so how do I undo that or is it meant to be so
    meaning one graph for my whole game?
     
  32. Guigui_White

    Guigui_White

    Joined:
    Nov 1, 2017
    Posts:
    10
    You just need to create a new graph. A graph will be a script so for each script you need, you must create a new graph.
    To reopen your previous graphs, you just need to click the button in the left up corner of diamond « Load Graph »
     
    maz_dev, Chebu777 and atmoruku like this.
  33. Guigui_White

    Guigui_White

    Joined:
    Nov 1, 2017
    Posts:
    10
    I know these features but I had problem with the Other Game Object Found At Radius so I started learning C# to make my own collisions scripts.
    Can you advert me when you publish the next update of diamond please ?
     
    atmoruku likes this.
  34. atmoruku

    atmoruku

    Joined:
    Dec 11, 2017
    Posts:
    7
    hi once again

    please can you put out a tutorial explaining the ....
    Logic
    Variables
    Compute
    so we get a better understanding cause for a beginner like me who doesn't know how to script and unfamiliar with the terms under these above listed logic options its impossible to get anything done....
    you don't have to go in debt on each of them just a basic tut not relating to any game genre.
    cause from the tut I watched on youtube....which ive not still gotten right.( screen shot in a previous post) very few details was covered from the whole diamond addon and looking from the whole option it seems theres a lot more that can be done.......not like I'm trying to compare this to playmaker....but if you watch these series you would totally understand the full functionality of playemaker and with your addon being free gives you an advantage over them but it lacks learning materials on the web to help beginners get started ......
    I hope I made sense....
     
    Chebu777 likes this.
  35. atmoruku

    atmoruku

    Joined:
    Dec 11, 2017
    Posts:
    7
    sorry I forgot to post the link to the series on playmaker I meant to refer to
     
    Chebu777 likes this.
  36. maz_dev

    maz_dev

    Joined:
    Sep 23, 2012
    Posts:
    261
    Yes I putted that in my planning so when diamond will have OnCollision/Trigger/Enter/stayExit methods in it I will inform you, and also informing you when diamond will support mecanim and animator component.

    These 3 fields is to customize your node, since diamond use only one customizable node, most things are in the logic: "Compute or operation".
    For example, having logic = "compute or operation" and variable = "float" will give you in compute a list of features related to a number (float) like add, subtract and so one,
    But having logic = "compute or operation" and variable = "camera" will give you in compute a list of features related to camera like: set get the field of view, make transformations between world space and screen space and so on.

    You are right for learning materials, we are working on a series of small tutorials and each tutorial focus on a feature of diamond. Waiting for this learning series you can ask any question in this forum or by mail at:
    mezanixissa@gmail.com

    Thank you guys and happy visual scripting.
     
    Last edited: Jan 3, 2018
    Guigui_White and atmoruku like this.
  37. friuns

    friuns

    Joined:
    Jan 14, 2016
    Posts:
    23
    Hi great project! Any plans make scripting inside game? instead unity editor.
     
    maz_dev likes this.
  38. maz_dev

    maz_dev

    Joined:
    Sep 23, 2012
    Posts:
    261
    Hi friuns, glad you like diamond.
    Did you mean the possibility to continue scripting the game after build? For example, build a game for android and when it is played on the mobile device, the game will bring with it some tools helping to continue scripting it?
     
  39. friuns

    friuns

    Joined:
    Jan 14, 2016
    Posts:
    23
    Yes! i making cross-platform game with in-game level editor and i looking to add there scripting engine.
     
  40. maz_dev

    maz_dev

    Joined:
    Sep 23, 2012
    Posts:
    261
    your project is interesting., At mezanix we have many tasks to do, is to make diamond mature enough, diamond is a great tool but it is still young and we are working to add many features to it.

    Your idea is in our plan, but for long-term (later), keep in touch (mezanixissa@gmail.com) and we are glad to discuss this idea with you when it comes to do it in diamond.

    Have a nice day :)
     
  41. Ben_Iyan

    Ben_Iyan

    Joined:
    May 13, 2016
    Posts:
    203
    Absolutely amazing! The design is beautifully thought out and implemented, and I congratulate you. I was wondering how to implement a function (and pass it a value). In your third tutorial, where you move the target, you have duplicated the node logic, whereas I would prefer to put that logic in a single function and pass a boolean value to denote which direction I want the target to move. Can this be done in Diamond?
     
    maz_dev likes this.
  42. maz_dev

    maz_dev

    Joined:
    Sep 23, 2012
    Posts:
    261
    Hi Ben, Glad you liked diamond,
    If I understood your question, you want to send bool information to a logic,

    Diamond has a transfer data system.
    get a look at this example in the asset:

    Assets\Mezanix\Diamond\3_Examples_Of_1_1_3_version\1_DataTransfer

    Your logic is composed of logic nodes, every logic node can have the structure: 1)Logic, 2)Variable Type and 3)Compute, every variable of the following type:

    bool, int, float, color, string, gameobject, rect, material, texture, shader, vector2,3,4

    can be broadcast (sent) over your game, so any other logic node of the same graph or of another graph can listen to these variables.
    For example to send a bool data, select: 1)Compute or opération for the logic, 2)bool for the variable type, 3) and send me as transferred data for the compute. a) Enter the data name (to recognize this data) b) play your logic (top middle play button in the logic window) and click on DoIt. By clicking on DiIt you have sent and register this data in the system under the data name. So now when you want another logic node to listen (receive) this data, 1)Compute or opération for the logic, 2)bool for the variable type, 3) and listen to transferred data for the compute. This logic node will show a drop-down button listing all transferred data names of this type, so you can listen to the data you have chosen.

    I don(t know if it recovers exactly your need, maybe your need is to group a set of logic nodes and condensate them in one entity to be handled like a one logic node, we are thinking about adding such kind of feature to diamond.
     
  43. rahuxx

    rahuxx

    Joined:
    May 8, 2009
    Posts:
    537
    Interested in beta testing. Have experience working with playmaker, iCS (icanscript) and uScript.
     
  44. maz_dev

    maz_dev

    Joined:
    Sep 23, 2012
    Posts:
    261
    Yes very good, we are about adding awesome features to damond and your suggestions will be very helpful.
    Thanks :)
     
  45. rahuxx

    rahuxx

    Joined:
    May 8, 2009
    Posts:
    537
    so how can I apply for access?
     
  46. maz_dev

    maz_dev

    Joined:
    Sep 23, 2012
    Posts:
    261
    High rahuxx, we are working on awsome projects:

    1. Game Design, coming soon, trigger-action system for very fast prototyping and full game developement. Work naturally with diamond for more deeper visual scripting,

    2. New diamond’s UI, consistent with unity standard UI, good clean and funny user experience. Find and customize fastly the Logic Node you need.

    We will contact you about the above points, here is our email: mezanixissa@gmail.com

    Feel free to contact us.


    Happy visual scripting :)
     
  47. maz_dev

    maz_dev

    Joined:
    Sep 23, 2012
    Posts:
    261
    Hi Guiguik, Diamond 1.1.8 is here and has :
    All unity contact events supported: OnCollision/Trigger/Enter/Stay/Exit/2D/3D in conjunction with the unity tag system, so you can detect any collision or trigger contact, and interact with.
    LogicNode configuration: Compute Or Operation / Game Object / Physics / Contact

    Sorry to be late to bring this feature, but at mezanix, we had working hard on a new asset: Game Design: a tool for prototyping and game building. Make your game mechanisms by a triggers actions system as any components in the Unity game object inspector.
    Works independently, it can also communicate with diamond via these Mezanix systems: Events, DataTransfer, GameValues and Diamond’s States.

    We believe that diamond (state machine and flow graphs) combined with game design (trigger action system in the unity inspector) is an ultimate solution for visual scripting thanks to the straightforward nature of game design and the flexibility of diamond.

    Game Design is in review now and will be accepted within a month :)
     
    Last edited: May 17, 2018
  48. maz_dev

    maz_dev

    Joined:
    Sep 23, 2012
    Posts:
    261
    IN LESS THAN TEN DAYS THERE IS AN IMPORTANT EVENT AT MEZANIX:

    HB-MinionB.gif

    DIAMOND VISUAL SCRIPTING (DVS) 1st BIRTHDAY

    The 1-year result of this small baby:

    • 19 releases => 1.6 release per month
    • 55 new major features => 4.6 new major features per month
    • Only 1 bug reported (less than 3 weeks after the delivery of the original version) => fixed the same day… and no more since this time
    • Dozens of questions always answered in the next 24h
    • Since few weeks, DVS is delivered for the last 6 versions of Unity3D

    MEZANIX is very proud of this little success and will bring you more for the next year (many new features are already planned).

    HB-Presentglite.gif

    MEZANIX is currently working on a BIG SURPRISE for our past, present and future users, TO THANK you all for the confidence and consideration of DVS.

    Comfort-Monster&Co.gif
    IT WILL BRING YOU AN INCREDIBLE COMFORT IN THE USE OF THIS ASSET!!!

    Calendar-Friday13th.gif
    YOU WILL FIND THE DVS BIRTHDAY PRESENT IN THE UPDATE AROUND THE 17th OF JULY...

     
    Last edited: Jul 27, 2018
    Anorak703, Chebu777 and chelnok like this.
  49. Chebu777

    Chebu777

    Joined:
    Jul 21, 2017
    Posts:
    17
    Great, I'm impatient to see the surprise. Congrats on the results and good continuation.
     
    Anorak703 and maz_dev like this.
  50. maz_dev

    maz_dev

    Joined:
    Sep 23, 2012
    Posts:
    261
    @Chebu777 Hey Chebu777,
    You are a great user of diamond and you will be pleased by the new surprise.
    Happy visual scripting :)
     
    Anorak703 likes this.