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

Brain Builder: A new take on visual scripting

Discussion in 'Made With Unity' started by Martin Magnusson, Sep 13, 2011.

  1. Martin Magnusson

    Martin Magnusson

    Joined:
    Sep 13, 2011
    Posts:
    71
    Hi all! We just finished a beta of our new visual scripting tool called Brain Builder.

    It's based on if-then rules that you create through a unique (patent pending) drag and drop interface. Rules are quick to build, easy to understand, and result in a much cleaner workspace compared to graph based tools.



    We'd love to hear what you think and are grateful for all feedback. If you want to try it out you can download the Unity package and view information on how to get started.

    Please note that this is a (free) beta, and your opinions can help make it even better. We plan to release new updates every week or two. Features currently in the works include:

    - Undo
    - Integrated documentation
    - Drag and drop game objects directly from the scene into rules
    - A "recently used blocks" group in the left panel

    Don't hesitate to get in touch if you have any questions. Cheers, Martin.
     
  2. Martin Magnusson

    Martin Magnusson

    Joined:
    Sep 13, 2011
    Posts:
    71
    Oh, and we're using Brain Builder to create an iPad/iPhone/Android game. No programming or scripting required!

    The game is a racing-physics-puzzler (new genre?). You drive a little yellow car over jumps and into obstacles. Complete levels by razing towers of blocks so that the red block ends up on the floor.





     
  3. p6r

    p6r

    Joined:
    Nov 6, 2010
    Posts:
    1,158
    Absolutely fantastic !
    Exactly what I think about a visual scripting tool !!!
    I will try it immediately... and give (constructive) comments...

    6R
     
  4. p6r

    p6r

    Joined:
    Nov 6, 2010
    Posts:
    1,158
    I have tried to simply make a gameobject (a Sphere) invisible at Start !
    I have used the Meshrenderer.enabled block + the "false" variable but I can't do it !?!
    Could you help me, please ???
    In the Public slots I have "Sphere" and "GameObject" ! OK ???

    The way we drag and drop slots ont the other is very funny and interesting...

    6R
     
  5. Maurice-Hoffman

    Maurice-Hoffman

    Joined:
    Jan 22, 2009
    Posts:
    182
    Looks cool i am going to try the beta
     
  6. MrBurns

    MrBurns

    Joined:
    Aug 16, 2011
    Posts:
    378
    Not the right place I guess, I will create a topic for this ^^
     
    Last edited: Sep 14, 2011
  7. Martin Magnusson

    Martin Magnusson

    Joined:
    Sep 13, 2011
    Posts:
    71
    Brief version: Create a slot of type MeshRenderer and use "Set (property) to (value)" to set its enabled property to false.

    Verbose version:
    1. Find UnityEngine MeshRenderer enabled and drag it onto the canvas
    2. Create a new slot and name it something like Renderer
    3. In the Inspector, change its type to MeshRenderer and drag your sphere onto it
    4. Drop your Renderer slot onto the MeshRenderer.enabled block
    5. Drag Builtins Set (property) to (value) onto the canvas
    6. Drop your Renderer.enabled block into the first position
    7. Drop Builtins false into the second position

    If you only want that to happen at start, drag Events Start onto the canvas and snap it to the left of the other block. Your result should look like this:

    $disable-meshrenderer.png
     
    Last edited: Sep 14, 2011
  8. kheng

    kheng

    Joined:
    Oct 22, 2008
    Posts:
    126
    looks interesting. Does have reflections? So if I want access to other plugins I can.
     
  9. Martin Magnusson

    Martin Magnusson

    Joined:
    Sep 13, 2011
    Posts:
    71
    Yes.
     
  10. p6r

    p6r

    Joined:
    Nov 6, 2010
    Posts:
    1,158
    Thanks a lot Martin, it works !!!
    I have to understand how it exactly works with simple actions/events first...

    Your tool is very clever and impressive... :)

    I sent you a PM. (See Notifications at the top of the page !)

    6R
     
  11. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    This looks great Martin. Do you have a time-frame when more information/documentation will be available?

    -Steve
     
  12. Martin Magnusson

    Martin Magnusson

    Joined:
    Sep 13, 2011
    Posts:
    71
    Thanks Steve! We thought about writing a manual, but feared no one would read it. Instead we have a screencast:

    http://youtu.be/xgA2eeOrkWg

    and a Q&A system:

    http://answers.boldai.com/

    What other kinds of information/documentation would you most like to see?
     
  13. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    Well considering the company we keep here I'd argue the majority would read the manual. :D

    Anyway I watched your initial video (which got me most interested) but did not see the QA section, excellent.

    Doing a quick glance of the questions listed I didn't see mention of For-While-Do Loops/Coroutines. Also if the answers were accompanied by screengrabs of your graphs I feel it would far more productive to educating new users (the goal IS visual scripting after all)

    Lastly in your video for example, how would you increase the power of the motor incrementally over time?

    Stuff like that! :D

    Thanks Martin!

    -Steve
     
    Last edited: Sep 16, 2011
  14. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,932
    So will this beta "run out" at some point and no longer work in Unity?
     
  15. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,932
    I would like to see some example of maybe setting up a trigger that causes an action to happen such as spawning a particle effect or accruing points.
     
  16. Martin Magnusson

    Martin Magnusson

    Joined:
    Sep 13, 2011
    Posts:
    71
    Yes, two weeks from the date of the last release (yesterday). However we'll always make sure to make a new release before the old one runs out.

    Eventually we'll add the tool to the Asset Store, priced similarly to other comparable products.
     
  17. MitchStan

    MitchStan

    Joined:
    Feb 26, 2007
    Posts:
    568
    WOW - amazing how Brain Builder is a seamless extension of Unity. Wonderfully envisioned. I'll start playing around with it now. My compliments on a fantastic extension. Brilliantly conceived.
     
  18. Martin Magnusson

    Martin Magnusson

    Joined:
    Sep 13, 2011
    Posts:
    71
    I'll get started on a manual right away :)

    We don't have loops at the moment, but plan to add a "For each" block.

    As for coroutines, we believe Brain Builder could replace the usage of coroutines for delayed execution with a more intuitive concept of time lines. The idea is that stacking actions side by side is a natural representation of a sequence of actions over time. While this is not yet part of the user interface, our compiler already has support for the feature.

    Do you use coroutines for something other than delaying/sequencing actions? Let me know!

    Screengrabs in the Q/A system is an excellent suggestion! I didn't even realize it supported images until now :)

    To increase motor power over time I'd add a slot "power" of type float, increase it every time Drive is executed, and reset it when Drive isn't executed. Is that a helpful answer?
     
  19. Broken-Toy

    Broken-Toy

    Joined:
    Jan 16, 2010
    Posts:
    455
    So basically, a scripting interface that handles syntax and vocabulary (the most time-consuming parts) for you while being structured as an actual script? Awesome. This is also the fastest way to learn how to design solid game logic when new at programming.

    Have a look at Construct (www.scirra.com) if you want further ideas for that kind of interface. they did some very interesting stuff back there including for/while loops, stacking conditionnals, inclusion of formulas as a valid input, snippets of script, custom blocks etc. although their interface was a bit clunky when it came to using and customizing blocks (having to go through C++ compiling to make a block is a no-go for all non-programming Unity users... they also used a lot of global variables, which isn't very adapted here).

    Best of luck with this project!
     
  20. Martin Magnusson

    Martin Magnusson

    Joined:
    Sep 13, 2011
    Posts:
    71
    How about this:

    - Create an "Explosion" particle system, style it to your liking, and make it a prefab
    - Create a "Missile" object, make it's collider a trigger, add a rigidbody and a brain
    - In the brain, make the missile travel forwards
    - When it hits an object, instantiate the explosion prefab and make that clone self-destruct in 3 seconds
    - Also increase a "Score" stored in PlayerPrefs

    The result should look something like this:

    $Missile instantiates particle explosion.png
     
  21. p6r

    p6r

    Joined:
    Nov 6, 2010
    Posts:
    1,158
    WOW ! I have to test it as soon as possible !!! Thanks Martin...

    6R
     
  22. runner

    runner

    Joined:
    Jul 10, 2010
    Posts:
    865
    Please forgive me if you are aware of this and my suggestion is a moot point :)

    You, might approach the UI and conceptualize the programming blocks, such as conditional loops, branching, and other aspects, by in large replicating the scratch interface and this could in fact lower the bar of entry in programming and benefit everyone involved.

    please actually give scratch a trial run as then its real power would be apparent.

    please draw you're attention to the picture below

    Note: Squeak is also used in the es operating system and for implementing the Scratch programming language for beginning programmers. In May 2011 the OpenQwaq virtual conferencing and collaboration system based on Squeak, an open source release of Teleplace, was announced on the Teleplace blog

    PictureLink
     
    Last edited: Sep 18, 2011
  23. p6r

    p6r

    Joined:
    Nov 6, 2010
    Posts:
    1,158
    If you want to test this explosion example, please don't forget to select Transform in the inspector for the public slot !

    I have added a second public slot "destroy" to destroy the missile on collision ! It works fine !

    6R
     
  24. Martin Magnusson

    Martin Magnusson

    Joined:
    Sep 13, 2011
    Posts:
    71
    Phew, there's now a manual availabe at:

    http://boldai.com/manual/

    It's far from complete, but it's a start :)
     
  25. Martin Magnusson

    Martin Magnusson

    Joined:
    Sep 13, 2011
    Posts:
    71
    Not at all! We've tested Squeak, but it was some time ago now. Sometimes you need a reminder. Excellent suggestion!
     
  26. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    Now see thats perfect! Just the little bit you have there really goes a long way to easily understanding your system (the trick now for us users is how best to use it to its fullest!)

    Curious, what is that cute little pic of the pathfinding green cubes at the top of the page? :D

    Thanks Martin!
     
  27. Maurice-Hoffman

    Maurice-Hoffman

    Joined:
    Jan 22, 2009
    Posts:
    182
    Thanks for the manual, i am going to test brainbuilder.
     
  28. Martin Magnusson

    Martin Magnusson

    Joined:
    Sep 13, 2011
    Posts:
    71
    Glad you like it :D

    The manual's top pic is what I'm working on right now - a ready-made obstacle avoidance brain. We want people to be able to download ready-made brains with useful behaviors. To rapidly prototype/build a game you'd just add a couple of them and, bam, you're done.

    Requests for ready-made behaviors are happily accepted!
     
  29. p6r

    p6r

    Joined:
    Nov 6, 2010
    Posts:
    1,158
    Yeah ! Thanks for the manual... It explains a lot of things : for example the different colors of the blocks !
    All seems so easy with this documentation !

    Great ! Ready-made brains are a wonderful idea ! To avoid frustration people and especially beginners or non-programmers need this kind of ready-made behaviors to create THEIR games "rapidly"...

    I really appreciate your plugin ! Great job.

    6R
     
  30. teamwhitesnow

    teamwhitesnow

    Joined:
    Nov 12, 2010
    Posts:
    85
    i know it's in early beta but how do you think your product will match up compared to the other visual scripting tools as far as learning and ease of use with coding?
     
  31. Martin Magnusson

    Martin Magnusson

    Joined:
    Sep 13, 2011
    Posts:
    71
    We're working on a number of features that we hope will make Brain Builder easier to use than other tools:

    1. Simplest alltogether is downloading and plugging in a prefab brain with the behavior you want. I'm currently creating brains for waypoint following, obstacle avoidance, random exploration, character control, and car control. Please suggest more!
    2. Next step is building simple behaviors of your own. This can be a bit overwhelming since Unity is a very powerful engine with a huge number of things you can do. I want to create a set of "beginners building blocks" with commonly used functions like moving, turning, getting input, etc.
    3. Then, when graduating to using more of Unity's functions, we have the same advantage as other visual scripting tools. No syntax errors. No type errors.
    4. Finally, when you get more advanced, your brains will tend to grow larger. This is when the use of rules instead of graphs shines. Rules are easier to read and more compact, which makes building entire games without traditional programming feasible.
    Also, we try to provide excellent support. Feel free to post questions here, or email me at martin@boldai.com
     
  32. teamwhitesnow

    teamwhitesnow

    Joined:
    Nov 12, 2010
    Posts:
    85
    sounds great i'll look into it! I haven't purchased a visual scriptor yet but have looked into some of them, this looks promising
     
  33. Martin Magnusson

    Martin Magnusson

    Joined:
    Sep 13, 2011
    Posts:
    71
    Thank you for the feedback you've given us! It really warms our hearts and helps us improve.

    Speaking of improvements, the third public beta of Brain Builder is out! Installation is automatic if you have the previous version. Just reopen the Brain Builder window, wait for the new version to pop up, and click download and install. Otherwise just download and import the Unity package.

    We have focused on improving documentation:

    • Explanations and examples while hovering over items in the palette (left panel)
    • Answers to questions at answers.boldai.com now include screen shots
    • An introductory manual available at boldai.com/manual/
    but also added new functionality:

    • Access other brains' slots
    • Indexing operators
    • Bugfixes
    and some convenience features:

    • Resize palette
    • Recently used blocks folder
    • Double-click and type strings and numbers directly in your rules
    Here's a teaser screenshot from the obstacle avoidance brain I'm working on:

    $Brain Builder Beta 3.png

    Again, all feedback is greatly appreciated!
     
    Last edited: Sep 26, 2011
  34. nullstar

    nullstar

    Joined:
    Jul 2, 2010
    Posts:
    186
    Software patent? Really? Bad form in my opinion.
     
  35. Jay_Adams

    Jay_Adams

    Joined:
    Nov 8, 2010
    Posts:
    152
    Looks pretty cool. The biggest hurdle for me in Unity has been the scripting side. I can whip out art quick then bog down in simple scripts for days. I'm going to have to check this out.

    You mentioned things above you are planning to add and they sound great. Way point following etc...
     
  36. pixelsteam

    pixelsteam

    Joined:
    May 1, 2009
    Posts:
    924
    Yes looking forward to seeing more examples.
     
  37. Duskling

    Duskling

    Joined:
    Mar 15, 2011
    Posts:
    1,196
    This looks awesome. I will be sure to test it out.
     
  38. Martin Magnusson

    Martin Magnusson

    Joined:
    Sep 13, 2011
    Posts:
    71
    Hurry up, because we're heading for the Asset Store.
     
  39. Vancete

    Vancete

    Joined:
    May 3, 2010
    Posts:
    198
    Good Job!
    But, I'm searching and... what's the equivalent of OnMouseDown for iPhone?
     
  40. Martin Magnusson

    Martin Magnusson

    Joined:
    Sep 13, 2011
    Posts:
    71
  41. teamwhitesnow

    teamwhitesnow

    Joined:
    Nov 12, 2010
    Posts:
    85
    after this hits the asset store .will you keep a steady support and update for like the other visual scriptors?
     
  42. p6r

    p6r

    Joined:
    Nov 6, 2010
    Posts:
    1,158
    I could make my 3D bumper car (after my 2D car) move fine and very quickly in Unity3D, thanks to Brain Builder :



    6R
     
  43. Martin Magnusson

    Martin Magnusson

    Joined:
    Sep 13, 2011
    Posts:
    71
    Yes! In fact, it's already on the Asset Store, we've already released an update, and we've prioritized spending time on supporting users over announcing the release. (Official announcement is coming soon though!)
     
  44. PolyMad

    PolyMad

    Joined:
    Mar 19, 2009
    Posts:
    2,350
    Hi, I downloaded the package from the first post but I'm probably missing something because no bundle or brains appeared... is that version ok?
    I would just try to do something with it before buy.
     
  45. Martin Magnusson

    Martin Magnusson

    Joined:
    Sep 13, 2011
    Posts:
    71
    You probably have a very old version. The Asset Store version comes with bundled brains. Not very many yet, but we're adding more in each release.

    As for try before you buy, we want that too. The difficulty is finding the the right balance in limiting the free version so that it's still worth the money to buy the full version.
     
  46. PolyMad

    PolyMad

    Joined:
    Mar 19, 2009
    Posts:
    2,350
    Uh, well, you could just allow a couple of options like keypresses and some parameters to be changed.
    I don't know if this is difficult to implement.

    Anyway, it would be nice to have at least a list of the features BrainBuilder.

    Like in example if it can change ANY variable assigned to any object and what system functions it can handle.

    I know this is boring stuff to set up, but it would probably help selling a lot ;)
     
  47. Martin Magnusson

    Martin Magnusson

    Joined:
    Sep 13, 2011
    Posts:
    71
    Thanks for the suggestions! They are now both on my todo list.
     
  48. p6r

    p6r

    Joined:
    Nov 6, 2010
    Posts:
    1,158
  49. PolyMad

    PolyMad

    Joined:
    Mar 19, 2009
    Posts:
    2,350
    Great, I'll wait for that and then for a discount day! :D
     
  50. Duskling

    Duskling

    Joined:
    Mar 15, 2011
    Posts:
    1,196
    I love it! Can I use this in a commercial game though? I would not mind putting your logo on the startup and in the credits :D