Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[DEAD PROJECT] Visual Programming for Unity.

Discussion in 'Works In Progress - Archive' started by Cynicat, Jul 21, 2014.

?

Are you interested in a Visual Programming System?

  1. Yes!

  2. Only if it where really powerfull.

  3. Only if it where really easy to Use.

  4. Not Really...

Results are only viewable after voting.
  1. zRedCode

    zRedCode

    Joined:
    Nov 11, 2013
    Posts:
    131
    Cynicat, i can send you a script in C#?, i want to know how it will come in visual programming, and how much time you need to make it in visual programming.
    (and i know 7 programming language, 1 outdated)
     
  2. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    Its looking great, good work on the UI! Much cleaner now. I think the extra work on the UI makes a product 100% better, keeping it clean and even more readable for the user.
     
    Cynicat likes this.
  3. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    As the OP said before, this allows you to block out your code and perform various tasks. No doubt you will be sending over some crazy complex script, which WOULD benefit from it being written by hand. I dont see why you are trying so hard to be negative about this?
     
  4. Cynicat

    Cynicat

    Joined:
    Jun 12, 2013
    Posts:
    290
    I'm afraid i don't have time. you aren't adding anything to this discussion. you are not providing valid critasism for the Work In Progress. nor being in any way constructive. please leave.
     
  5. Cynicat

    Cynicat

    Joined:
    Jun 12, 2013
    Posts:
    290
    glad you like the new UI. i totally agree as well, the UI is key especially for a visual editor of any kind.(psst, just got icons work and they are a huge improvement!)
    Icons.png
     
  6. Cynicat

    Cynicat

    Joined:
    Jun 12, 2013
    Posts:
    290
    like the look of your system and your character system looks very cool! as for zooming, node customization and such i need to work on that a bit. the focus of mine is more on an alternate type of text editor then a framework but i would still like to have things like plugins. good luck on your projects =3.
     
  7. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    Very nice! I started work on the foundations for one this week, im currently learning more Editor Scripting as im going along, to help understand what can be achieved. Its quite fun!
     
  8. sledgeman

    sledgeman

    Joined:
    Jun 23, 2014
    Posts:
    389
    Great visual improvements ! Got curious about the icons :) Maybe you plan more of such specific icons. Didn´t remember, do you also plan some basic "presets", like: follow object, change velocity and so on. Could be useful to get instant start with your tool and to learn basics. What would be great, if you can "save" your nodal work. Like a library. With this I am able to "re-use" lot of my presets for new games. Unlike in other solutions, you are not able to save your nodes, so you have to load your whole project therefore. The community would also benefit from this, cause they can share their work. imho...
     
  9. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    PlayMaker allows you to save your StateMachines as Templates, which allows you to share them throughout projects. Is this what your after?
     
  10. Cynicat

    Cynicat

    Joined:
    Jun 12, 2013
    Posts:
    290
    yes i am planning there to be re-usable nodes. matter of fact thats the entire basis of my system. text nodes will be grouped to form basic functions. these will then be put together(grouped more if necessary) to form game logic. i am hoping you will be able to make node groups work across projects but i have to research weather or not its possible or practical first. =3
     
  11. sledgeman

    sledgeman

    Joined:
    Jun 23, 2014
    Posts:
    389
    Okay, sounds good. I think if we can play with it, there would be much better constructive feedback.
    @mimminito : Hm, PlayMaker has something like this, but don´t prefer the kind of menu / logic to save or load these templates. It could be better implemented / designed. Sure, its a very good tool and nice to have, but could be more well structured. We will see what they are cooking next.
     
  12. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    Yeah, took me a little while to understand it even supported templates (they could do with some better documentation I suppose) but it does work quite well. Serialising a graph to JSON for example would make it very portable
     
  13. Cynicat

    Cynicat

    Joined:
    Jun 12, 2013
    Posts:
    290
    *Sigh*.... okay. little tip to all current and future programmers out there. doing the majority of your work on software after a long day while dead tired leads to really stupid mistakes... like never using GUILayout.... when GUILayout would make your life easier... and writing useless algorithm's to do something GUILayout does by default... dont be me kids. on the bright side, been making progress on refactoring the Node Group system. still needs a decent amount of work but once its ready i'm thinking about maybe(depending on the condition of it) sending out some beta copy's for testing. might need a few more days of work before groups are even close to ready though. thanks for sticking with me guys!
     
  14. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    I'm still very new to the editor scripting side of things, lots to learn! They definitely need better documentation on it, good examples etc.

    I'm very keen to see the beta! Keep it up
     
  15. Kinos141

    Kinos141

    Joined:
    Jun 22, 2011
    Posts:
    969
  16. Cynicat

    Cynicat

    Joined:
    Jun 12, 2013
    Posts:
    290
  17. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    I had completely forgot about this as well! Looks very handy, thanks for the tip :)

    How is the development going @Cynicat?
     
  18. Cynicat

    Cynicat

    Joined:
    Jun 12, 2013
    Posts:
    290
    pretty well. had a few busy days but have more "free" time now. been reworking how nodegroups work to make them more portable/usable. got the basic framework done, but little to no functionality. however by the look of things i prolly need to redo most of the UI because of the amount of stuff that unity has that i forgot to use. hopefully it will be simpler in the end. its fun though :3
     
    mimminito likes this.
  19. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    Sounds good! Im looking into other open source editor projects, see how they accomplish things, and then see how I can do things. Im just having fun creating a node based system atm, but its very interesting thinking up how things need to be done, relationships, etc.

    Glad its all working out though!
     
  20. Cynicat

    Cynicat

    Joined:
    Jun 12, 2013
    Posts:
    290
    been redesigning a new base for the system. @mimminito gave me the idea when he asked about creating a node editor. so I've been working on a nice base for managing graphs in the editor. hopefully this should make creating flux easier as well as any other graphs i might need(example would be i might want a script manager down the road for things like inheritance, interfaces, etc...) also would be useful for people interested in making graphs themselves. a lot of things become easier with graphs.

    however I've also been looking into a better UI design system. currently its all hard-coded and its getting to hard to add things to. so I'm looking into attributes (how the unity editor does its inspector and such). to see if there are some tools i can make to help people make coded nodes easier. this might delay the beta a bit(sorry) but in the long run it should be easier, better and more powerful.

    hope your all having a great week and good luck on all your works and endeavor's! =3
     
    mimminito likes this.
  21. Cynicat

    Cynicat

    Joined:
    Jun 12, 2013
    Posts:
    290
    okay i finished the rough design for the revamped version. ok several problems with the old design have been resolved.

    First: zooming and other UI features are going to be supported.
    Second: being built with a generic graph system. this should make creating custom graphs easier.

    Third: going to switch to an Icon only display for a few reasons. more nodes on screen without a ton of text making it confusing, can use inspector for specifics therefor a more unity-ish design.

    Fourth: Plugin system. because of the way the new system works you will be able to create your own coded nodes without a huge hassle. you will be using system's like the unity custom inspectors as well as other stuff.

    Fifth: WAY better support for node groups right out of the gate. being that the entire system is concepted around the idea of node groups i really should have designed from the bottom up with groups in mind. now i have.

    Sixth: the new design is way simpler. its easier to code, supports more, has more re-usable components and is also more integrated with unity as a whole.

    ill be posting more progress updates soon as i've mostly been working on the design which isn't very post-worthy. ill also be posting the generic graph system once i've tested it alot more. that will be creative commons probably. graphs are such a pain and there are so few resources out there. it really is simple once you get the idea but learning all the tricks to the editor is hard.

    hope you are all having as much fun as i am! have a great day =3
     
    mimminito likes this.
  22. Cynicat

    Cynicat

    Joined:
    Jun 12, 2013
    Posts:
    290
    Ok guys new plan! i had a brainstorm today and sadly it means that I'll be replacing the revamped version again. i wasn't happy with any of the design's i had used up to this point until i found this one. the old ones have mostly been the usual node, edge, graph settup. the new system is alot more unity-ish.
    here is a picture of the new idea.
    graph contains nodes. which now are more like game objects than tradition node graph nodes.
    newLogicGraph.png
    I am still going to be releasing what i've done on the graph system however its not in perfect condition. i'm not including the compile code as its broken as sh*t. however consider anything in graph.zip to be creative commons. that means whatever goes. its mostly if you want a traditional graph system. ill be gone for a few days then ill be back and working on the new approach which should be super fast and simple. mostly what has slowed me down lately was trying to find a solution for code-gen that didn't suck. now i have =3. hope all your works are going well! if you need any help with the graph system PM me and ill try to help out once i'm back.
     

    Attached Files:

    mimminito likes this.
  23. Cynicat

    Cynicat

    Joined:
    Jun 12, 2013
    Posts:
    290
    Ok minor update on the new framework. got most of the tricky stuff done and i'm on to UI. one of the new features from the new design is that any graph could be turned into a logic block(node). similar to substance designer in allowing you to create input and output nodes. these turn into function's, public variables, etc if compiled into a script. also going to be making my own UI art instead of just using the ripped stuff from unity (eventually).
    hope your are all having a great week.

    Little stuff:
    the editor window will now always open next to the scene view.
    the graph system is now extendable. this means i could make new kinds of graphs/logic graphs with relative ease.
    alot less area for failure in this design.
    the design is alot easier to change parts of. hopefully this means i wont have to restart anymore.
    alot less code to do the job way better.
    having more fun with this design.
     
    mimminito likes this.
  24. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    Looking and sounding great. Cant wait to test it out!
     
    Cynicat likes this.
  25. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,291
    I think the root of the problem is that a programmer feels very restrained with such systems in general. I tried working with Playmaker and i felt like it was taking me ages to what i would do in a few minutes in code in a mass scale.

    I am not sure from what i read how you can handle that problem, but if you do your system would be much desirable

    One huge problem with the visual thing is that code can be spread like a virus, while the visual entity cant be easilly batch changed, that is my main issue and what would make a huge difference, a centralized approach than a script per object.
     
  26. Cynicat

    Cynicat

    Joined:
    Jun 12, 2013
    Posts:
    290
    the way flux is designed is to be an alternative way of writing scripts(Monodevelop with graphs). not really a visual logic system like most. this means you will be doing mostly the same thing you do through code, just faster and simpler. obviously i cant prove this till i have a beta but that will be coming.

    i totally get your problem with visual scripting. its my problem with visual scripting. however after using a few systems which do visual logic really well i want to do the same thing for unity. i'm going to try to combine my favorite elements of my favorite graph systems and hopefully make something useful. if people are interested in using it once its done then great! if not, no biggy. mostly i just want something that focuses more on the design of games rather than the implementation. if that sounds good then stick around. as long as there are people interested in what i'm working on then i dont mind sharing. =3
     
  27. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,291
    Sounds very interesting, maybe this is the first visual tool i will use :)
     
    Cynicat likes this.
  28. Cynicat

    Cynicat

    Joined:
    Jun 12, 2013
    Posts:
    290
    Update: got the basic structure for the UI implemented. got the transformation for zooming and panning done(no control's yet). now i have to re-implement most of the UI elements(hopefully alot better than the last =3). ill keep you guys posted.
     

    Attached Files:

  29. Cynicat

    Cynicat

    Joined:
    Jun 12, 2013
    Posts:
    290
    Update:
    got node dragging back.
    new gui code is way easier to use.
    figured out the actual good way to do the toolbars.

    mostly trying to get all the graph editing controls back in so i can actually get more functionality working. as its hopefully going to be way better/faster with the new framework.=3

    OK so heres a poll for you guys: do you want me to use the built-in toolbar's or the black one i was using before?
    black one:
    toolbar.png
    lightskin and darkskin builtin toolbar:
    builtin toolbar.png
    proskin builtin toolbar.png
     
  30. EBR

    EBR

    Joined:
    Jan 27, 2013
    Posts:
    117
    This looks like a really good project, loving the progress. And I prefer the black one :) Keep up the good work
     
    Cynicat likes this.
  31. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    Black looked good!
     
  32. Cynicat

    Cynicat

    Joined:
    Jun 12, 2013
    Posts:
    290
    glad you like the project =3. ok so black it is by the sound of it! now to dig through the editor UI file lol whoever thought that one giant guiskin for the editor was a great idea must be really cruel... :(
     
    EBR likes this.
  33. Cynicat

    Cynicat

    Joined:
    Jun 12, 2013
    Posts:
    290
    realized i have not posted in a bit so i thought id talk a little about how i'm doing the new GUI as its kinda relevant to anyone making an editor of any kind. first things first. the way i did UI the first time was a simple Draw() command on all nodes, ports and graphs. sounds great at first but becomes really hard to deal with when you finally start balancing that with the other function's of the objects in question. the way unity recommends is through some kind of inspector or editor. i now agree though i didn't when i started. it seemed clunky and slow compared to just having a draw function chain. the advantage of the editor approach is that you have a clean workspace that is only concerned with rendering and nothing else. this leads to much cleaner separation of important data that NEEDS to be saved and unimportant data that doesn't. basically it means writing the node drawer more like a custom inspector or something.

    another thing is i found a way to turn any method into a node through attributes. this is not exactly going to be a high priority but would still be very useful for nodifying existing code. this technique could also be used for stuff like classes you want to show up better on the graph. you want that item class to be a redish color? then put [FluxProperty("Inventory Item", Color.red, etc...)] above the class like you would with [ExecuteInEditMode()] or something. hope your projects are going well and sorry for the gaps in posts lately. been busy with alot. =3
     
  34. vipvex

    vipvex

    Joined:
    Dec 6, 2011
    Posts:
    72
    Flux is looking very promising! Can't wait to see more updates.
    How did you get the nodes to look like Mechanim in the earlier updates? To make my Editor GUIs look like unity I use EditorGUIStyles however it doesn't have .mechanimWindow. Have you gotten the zooming functionality working? I tried implementing zooming in my own editors however with no luck. Would you give me insight on how you did it?
     
  35. Cynicat

    Cynicat

    Joined:
    Jun 12, 2013
    Posts:
    290
    yeah its a bit of a hack. you use EditorGUIUtility.GetBuiltinSkin(EditorSkin.Inspector) to get the guiskin(which i saved to an asset in my project for my searching pleasure). you use NameOfInspectorSkinHere.GetStyle() to get one of the 400+ custom styles in the inspector skin. the mechanim nodes are named: "flow node 0" the number can be 0-6 for the different colors. also use "flow node 0 on" to get a selected version.

    i'm also using a hack for zooming. i have a vector2 called offset and a float called scale and finally i use a method called ModRect that applies the offset and scales it down. then i draw using that(i'm too lazy to use GL). if you dont want it to zoom you just dont run the rect through ModRect.

    sorry for the lack of updates lately. been working alot. hoping to get back into this soon. sadly there is already something named flux on the asset store i found out so now i have to find something else. =< now to go to thesaurus.com and search for things.
     
  36. makoto_snkw

    makoto_snkw

    Joined:
    Aug 14, 2013
    Posts:
    340
    I'm already using plyBlox which is also a visual scripting.
     
  37. Cynicat

    Cynicat

    Joined:
    Jun 12, 2013
    Posts:
    290
    yeah i just find the Scratch style of visual scripting to be a little tedious but if you like it than more power to you. i dont want to seem like i'm downing other kinds systems. i just want a code editor that works through nodes and i'm having fun making one. =3
     
  38. makoto_snkw

    makoto_snkw

    Joined:
    Aug 14, 2013
    Posts:
    340
    Ah, don't get me wrong.
    I vote on your poll, and I reply on what I've used.
    There's no way I condemn your effort.
    In fact, it attracts my attentions.

    plyBlox is good for predefine functions.
    It's also extensible, need a hard code.

    MAYBE your code can replace writing codes on .cs at all.
    I mean, the projects can run 100% based on your visual scripting only.
    If so, it can even used to extend other scripts, even plyBlox itself.

    I'm looking forward for it.
    Though, I'm not sure what is your goals, will this for sale or how?
     
  39. vipvex

    vipvex

    Joined:
    Dec 6, 2011
    Posts:
    72
    Are you using windows for each node or just drawing a rect?
    I tried looking for the Mechanim like Grid texture but with no luck. Could you tell me the name of the style?
     
  40. Cynicat

    Cynicat

    Joined:
    Jun 12, 2013
    Posts:
    290
    Handles.DrawLine() is how i did the grid.
    the nodes where just GUI.Box(ModRect(rect), name) or button.
    hope that helps =3
     
  41. Cynicat

    Cynicat

    Joined:
    Jun 12, 2013
    Posts:
    290
    if there is enough interest i may sell it.

    i like the idea of extending other system's as well. stuff like writing editor windows, playmaker states and perhaps plyblox blocks as well.

    my goals are not to replace code completely. more to offer a visual scripting system that is simple and still fits into the unity workflow. unity is a programming focused engine so having a system that restricts your power as a developer is something i don't find that useful. however there are times when i want to make something and only think of the design and its sometimes hard to keep the flow of the logic in mind when working with text code.

    hope that clears things up =3
     
  42. vipvex

    vipvex

    Joined:
    Dec 6, 2011
    Posts:
    72
    One last question how did you get your ScriptableObject have it's own icon in the project folder instead of the default one?
     
  43. GarBenjamin

    GarBenjamin

    Joined:
    Dec 26, 2013
    Posts:
    7,441
    LOL! So true! I am one of the guilty ones who did that. And still do I suppose.

    About 25 years ago I decided to try C. I was coding in Assembler at that time. And basically my view was exactly as you described. To me C wasn't a real language. Seemed like a toy for people too lazy to learn Assembler. Once I started using C I realized how wrong I was. It made development and debugging so much faster than doing everything in Assembler.

    I do wrestle a lot with visual programming. I think because of my roots in just doing it all myself. Unity3D itself the GUI really took me a while to come to grips with it. And even now I do not use the Animation system, rigid body physics, etc. Because I prefer to code it myself so I can have control over what exactly is going on.

    Anyway, I just wanted to say you definitely hit the nail on the head here. Your visual scripting tool is looking awesome!
     
    Last edited: Sep 5, 2014
    Cynicat likes this.
  44. imaginaryhuman

    imaginaryhuman

    Joined:
    Mar 21, 2010
    Posts:
    5,834
    If you don't like typing you're not going to like the repetitive strain you get form all the dam mouse clicking and movements needed to implement these graphs.

    I find them a sorry substitute for written code... usually they are just another way to visually `represent` code, and you still have to know how to program and hook all these things up, and the actual visual representation of the `program` is not very easy to digest or follow.. it just looks like a bunch of connected boxes. There are major usability problems to solve before I would find it intuitive.
     
  45. Cynicat

    Cynicat

    Joined:
    Jun 12, 2013
    Posts:
    290
    all valid concerns. you find text code easier because you have experience with it though, not due to some inherent usability of text code. as for mouse clicking i agree alot of the current solution's have massive problems with this. however as i work with many graph based programs many have found fast ways to speed up usage. to the point where i can make a shader in blender way faster than in text form.

    sadly been very busy lately and not really had much time to work on this. but i just want to say that i realize that usability is an issue as well as speed and i can say that visual programming has the potential to be the next speed language. but that needs a clean design, good controls and a focus on not compromising. its not going to be text code. thats the point. i don't expect it to be instantly faster. i want to make something that is easy to learn and once you have got the hang of it you can start being faster than normal. another tool for programmers not a tool aimed at non-programmers.

    i hope i can make something that will change your mind about visual programming but in the end, its up to you weather or not you are interested in seeing if i can make something that may be useful. =3
     
  46. Cynicat

    Cynicat

    Joined:
    Jun 12, 2013
    Posts:
    290
    you need to add a folder in your assets folder called "Icons". it needs to be in assets and nowhere else(annoying but required). then you name it like this: ScriptableObjectIcon.png where ScriptableObject is the name of your class. this will make it show this icon instead of the builtin.
     
  47. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    Any more progress on this?
     
  48. sledgeman

    sledgeman

    Joined:
    Jun 23, 2014
    Posts:
    389
    Yep...would like to see some progress :)
     
  49. Cynicat

    Cynicat

    Joined:
    Jun 12, 2013
    Posts:
    290
    I recently picked this project up again after a huge hiatus(due to IRL stuff). new framework is alot more shiny. starting with a generic node based editor and implementing the logic editor as an extension to that. I've only been back on this project for 6 days so its not much yet, but currently its going well.
     
    mimminito likes this.
  50. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    Awesome, thanks for the update. Mine never managed to gain any traction, I have too many other commitments, but I look forward to seeing yours in action as soon as its ready :)
     
    Cynicat likes this.