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

why unity has no built in visual Program tool ?

Discussion in 'General Discussion' started by zuanzike, May 31, 2015.

Thread Status:
Not open for further replies.
  1. zuanzike

    zuanzike

    Joined:
    Sep 20, 2011
    Posts:
    19
    Unreal has blueprint bool ,it means non Programmer people can also making game;
    at last , I found and use playmaker ,it's cool ,I made game with playmaker so fast than any tool; but after all, it's not built in tool for unity,so sometimes I have to wait its updating for long time,it makes me sad, so ,
    why unity has no built in visual Program tool ? you done this engine for only Programmer ?
     
  2. dogzerx2

    dogzerx2

    Joined:
    Dec 27, 2009
    Posts:
    3,960
    That would be nice, but it's about picking battles. I used to want the same, but I've personally decided writing code is not that bad, so I don't long for node programming as I've used to.
    Blueprint, for example, is very intuitive, easy to learn, but it's hard to manage at larger scales. A single line of complex code in written scripting, may translate to half a page of nodes, arrows pointing in every direction, etc in Blueprint. Imagine 100 lines of code. I think for node programming to be as useful as written code, it needs to be highly optimized.
    Having said that, I think Unity's Mecanim node editor could possibly evolve into something that also controls scripts, maybe for Unity 6.
     
  3. Ostwind

    Ostwind

    Joined:
    Mar 22, 2011
    Posts:
    2,804
    I don't know how much demand there actually is for visual scripting like based on unity feedback section there are only few entries related to it with very low vote count and opposing comments. It probably has been a priority thing in past and might still be cause there are several solutions in the Asset store.
     
    dogzerx2 likes this.
  4. delinx32

    delinx32

    Joined:
    Apr 20, 2012
    Posts:
    417
    I sometimes wonder if there as many artists out there who wish they had a friend that programmed as there are programmers that wish they had a friend that could do art. I'm often jealous of artists. I feel like if I could do art, then I would actually have a chance at making money doing this, but then I think of the time involved and I already spend most of my time coding, so I wouldn't have the time to make art even if I could.

    We need the equivalent of a dating site that matches up people with different skills so they can make money and take over the world.

    SC#P LF S3DEA -> "Single C# Programmer looking for Single 3d environment artist".
     
    Jamster, Kiwasi, Ryiah and 1 other person like this.
  5. yoonitee

    yoonitee

    Joined:
    Jun 27, 2013
    Posts:
    2,363
    What I think is that the point of visual programming is that it is for people who can't remember all the specific keywords and function names needed for a written programming language. And the reason for this is that programming languages are very artificial and restrict the allowed words. We should really be moving towards natural language based programming:

    Code (CSharp):
    1. Add a red sphere with radius 1 metre.
    2. Add a cube the same size as the sphere positioned directly on top of the sphere.
    3. The cube shall have a mass of 5kg.
    4. When the user clicks on the sphere play sound "pop".
    5. Keep repeating the sound until the user pressed key "A".
    6. When the user clicks the cube apply a force upwards of 5N.
    7. Add a mesh from the file "mycar.3ds" to the scene and call it "car1".
    8. The longest side of car1 shall be 5 metres.
    9. Write the square of each number from 1 to 100 in the console.
    10.  
    There's no reason in this modern day why the above couldn't be directly turned into a working Unity game by the computer. Instead of errors it could just ask questions like "Where do you want the red sphere to be placed?"
    This way a new user could simply type out a set of instructions without having to learn a programming language. It would mean allowing many different words for the same instruction. For instance here "When" could be replaced by "If" or "Whenever" or "Every time" or "As" and each would be valid.
    I think natural language is an ideal fit for making 3D games based on real world environments.
     
    Last edited: May 31, 2015
  6. Ostwind

    Ostwind

    Joined:
    Mar 22, 2011
    Posts:
    2,804
    That would not never work. You completely skipped things like variables, functions and etc which will always be needed. Such code will also be a lot harder to read and maintain, almost as bad as visual scripting but even worse.
     
    randomperson42 and Kiwasi like this.
  7. yoonitee

    yoonitee

    Joined:
    Jun 27, 2013
    Posts:
    2,363
    It can have variables: Add a sphere and call it "sphere1." Add a float and call it "score". etc.
    It can have functions: Make the height of the sphere be the cosine of "health".
    Instead of new Rectangle(2,3,10,10) you would type, for instance:
    Create a rectangle with width 10, height 10 and top-left at coordinate (2,3).

    It would be very easy to maintain unless the English language changed substantially. Then it would be like reading Shakespeare: "Create thy sphere and place it thus on thine cube."

    I think if it is possible to describe in words to a programmer how you want the game to work then it should be possible for the computer to understand it too.

    I don't think in the future we will say to a computer "new rectangle bracket ten comma ten comma fifty comma fifty close-bracket".

    Granted such a language would be very very very difficult to implement!

    Maybe as a compromise if it was restricted to placing 3D items in a scene and listening for events it would be quite useful.
     
    Last edited: May 31, 2015
  8. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    We should not be, because natural language is ambiguous, and that is deadly to programming. By the time you add all the necessary disambiguation stuff, you end up with just another programming language, except it's harder to write code with and very difficult to debug. In the quest to make things "easier" you're actually making it much harder. The easiest thing is just to learn programming; you save a lot of time and effort in the long run.

    --Eric
     
  9. delinx32

    delinx32

    Joined:
    Apr 20, 2012
    Posts:
    417
    Not to mention that all of the programmers would be out of a job. If normal people could read legalese, then there would be no lawyers. If normal people could talk to a computer and have it write a program, then there would be no need for programmers. Since a programmer would have to write the program that wrote the programs it is unlikely to be done. It would be guaranteeing self obsolescence, and since most programmers think they are the greatest thing since sliced bread, it is unlikely to happen.
     
  10. yoonitee

    yoonitee

    Joined:
    Jun 27, 2013
    Posts:
    2,363
    But the idea is that the computer can check whether a sentence is ambiguous. And if it is, it asks for clarification.

    Take the sentence: "If the user clicks on the red sphere play the sound 'pop'."

    I'd say that's pretty unambiguous. And much quicker to type than searching for all the correct function names and thinking about where to put the event code.

    But I admit it might not be for everyone.
     
  11. Ostwind

    Ostwind

    Joined:
    Mar 22, 2011
    Posts:
    2,804
    Well here is a challenge for you:

    Do the unity roguelike example with your proposed way and when you give up, show us the code you managed to do before realized it would be a downgrade vs visual scripting or coding :)

    Leave the original comments above your language calls.

    http://unity3d.com/learn/tutorials/projects/2d-roguelike
     
    liortal likes this.
  12. delinx32

    delinx32

    Joined:
    Apr 20, 2012
    Posts:
    417
    Computers can't do that. That's why I have a job. There may be a point in the future where a computer can reason, but as of now then cannot. It requires a human brain to translate what the client wants and put it into terms the computer understands. Generally there are 2 human brains involved. First the analyst has to translate "user language" into "programmer language", then the programmer translates "programmer speak" into "computer language".

    The client can't even tell ME what they want in an unambiguous manner, let alone tell the computer.
     
    alexzzzz and Kiwasi like this.
  13. delinx32

    delinx32

    Joined:
    Apr 20, 2012
    Posts:
    417
    Case in point, there are two typos in my paragraph. I've declared two different variables "programmer language" and "programmer speak" that are supposed to be one value, and my third sentence doesn't make any sense if read literally. If you replace "then" with "they", then it does. A computer can't figure that out.
     
  14. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,141
    Are you willing to fund the carpal tunnel treatments? Because a verbose language would kill the wrists. The beauty of C#, combined with a competent IDE, is that I do very little typing to get the job done.
     
  15. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    Congratulations! You just won the price for the most naive and biased post I have ever read in this forum!
     
    Dustin-Horne likes this.
  16. yoonitee

    yoonitee

    Joined:
    Jun 27, 2013
    Posts:
    2,363
    Well, I'm an optomist and I think computers will be able to do this one day. I had a go at translating the Game Manager class.

    Code (CSharp):
    1. A "Game Manager" is a type of Mono Behaviour.
    2. When a Game Manager is awake "initialize the game".
    3. To "initialize the game" "set up the scene" of the "board" with level 3.
    OK it's not perfect. Plus I think it's wrong to try and directly try to translate c# into human language. Since we have a different way of writing things. If we translate directly from c# it just comes out as too abstract.
     
    Last edited: May 31, 2015
  17. Ostwind

    Ostwind

    Joined:
    Mar 22, 2011
    Posts:
    2,804
    Well you are completely free to make/convert it any way you want as long as all the logic and accessibility remains the same. Now you skipped a lot of things and only tried it with trivial things. How about trying it with the board manager? The code would get messy and hard to follow fast.
     
  18. yoonitee

    yoonitee

    Joined:
    Jun 27, 2013
    Posts:
    2,363
    But have you ever read the rules of Monopoly? They're messy and hard to follow. Yet a human being can read them all and play the game of Monopoly... I don't necessarily think translating the rules of Monopoly into C# make them any easier to follow. In fact for someone who didn't understand C# they'd be very much harder to follow. Erm.. I'm not sure what my point is here. :confused:
     
  19. dogzerx2

    dogzerx2

    Joined:
    Dec 27, 2009
    Posts:
    3,960
    The more control you surrender to the computer side for the sake of having the human thinking less, the less control the human will have when p00p hits the fan, and wants to know just what's going on.

    That aside, it would be super fun to have a language and compiler that has some automatic disambiguation.

    For example:

    Add a sphere. Move it upwards 5 units. Delete the sphere.

    You can add a sphere without a variable name. But since it's the last thing created, you can refer to the sphere as "it". Also, if there is only one sphere on the scene, you can refer to the sphere without a variable name. If there were more than one spheres, it'd delete the last sphere or something.

    Note I said it would be 'fun', not useful for large projects. :p
     
    SunnyChow and Kiwasi like this.
  20. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    Go write it. Its not that hard to implement a basic programming language. You'll quickly find out why every programmer who has commented has said "Don't do it"
     
  21. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,141
    This shows how little you understand the effort involved in a case. A law firm may have many lawyers but only a relatively small portion of that firm will handle the cases in the courts. The remainder is tied up in actual research of both laws and past rulings related to the current case.

    Likewise programming is more than simply sitting at a computer and typing. You need to be able to break down your problem, determine how you want to solve each step, research the necessary APIs, hunt down bugs, etc.

    A visual programming language only replaces the actual code. It will not make a non-programmer into a programmer.
     
  22. darkhog

    darkhog

    Joined:
    Dec 4, 2012
    Posts:
    2,218
    Ultimately, I'd like Unity to add tool like that, but currently Unity has bigger issues to fix, listed in no particular order:

    • Input manager that allows for rebinding keys at runtime
    • Linux IDE
    • Proper networking solution that will be easy to understand for people that aren't network engineers.
    • Changing "made with Unity Personal Edition" into "made with Unity" for non-Pro users
    • Some sort of visual shader editor. Standard Shader is a step up, but such solution would make it easier to do materials that are hard or virtually impossible to do without coding a shader. And writing a shader is harder than writing netcode, trust me - tried both.
    • Unity Editor for Linux
    • More and better assets bundled with Unity. For example lack of good (i.e. not going through walls) TPP camera makes making 3D platformers with Unity really hard.
    • "Made with Unity Personal Edition" should be just "made with Unity"
    • IDE for Unity available for Linux users
     
  23. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,141
    Yes, this would have far more impact than a visual programming tool. We already have many solutions for visually programming, both free and otherwise, but we only have Shader Forge for visually creating shaders.
     
  24. Ostwind

    Ostwind

    Joined:
    Mar 22, 2011
    Posts:
    2,804
    Monopoly rules are interpreted by the players and not by a computer which might not understand things. Monopoly is also a bad example as the rules are usually customized based on who, how many are playing etc.
     
  25. darkhog

    darkhog

    Joined:
    Dec 4, 2012
    Posts:
    2,218
    To be fair, there's Strumpy's, etc., someone just need to fix it for U5.
     
  26. ippdev

    ippdev

    Joined:
    Feb 7, 2010
    Posts:
    3,793
    The beauty of hunt and peck single finger or dual finger typing is no carpal tunnel syndrome. Now ZBrushing for two days solid.. Ouch mofo!
     
  27. Tomnnn

    Tomnnn

    Joined:
    May 23, 2013
    Posts:
    4,148
    @yoonitee programs are a set of instructions. Natural language programming serves only to make ambiguities that compilers can't solve on their own because you might expect your code to work 1 way but it gets interpreted another way. The only clear instruction set is... a clear instruction set. Programming as it is now.

    This all the way.

    I think there would also be some fun problems to solve regarding variable scope. Natural language isn't organized with nesting, it probably wouldn't even be able to handle a concept like scope.

    Whaaat? I totally recommend it!
     
  28. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    This brings up a good point. We totally have this problem in reverse. We should be striving to fix natural language to make is less ambiguous.
     
    SunnyChow and Tomnnn like this.
  29. Tomnnn

    Tomnnn

    Joined:
    May 23, 2013
    Posts:
    4,148
    But that's what makes our language so beautiful :D

    People need a grasp of so many things to understand one another with english. If you're using an expression, their only indication of what you mean is how you said it!

    "Break a leg" does not translate well in other languages. And you can't rely on inflection, because in some languages that could change the word being spoken!
     
    dogzerx2 likes this.
  30. yoonitee

    yoonitee

    Joined:
    Jun 27, 2013
    Posts:
    2,363
    Maybe we could use a less ambiguous natural language. We could try German or Chinese...

    I don't think scope is an issue mostly.

    Except, for example, "I saw the man with the telescope in the park."
    Could mean the man had a telescope or you were in the park or he was in the park. etc. But when the computer tried to parse it it would tell you this was ambiguous and request clarification (much as an editor might do in a research article). So you would rewrite that as:

    "While I was in the park I saw a man who was carrying a telescope."

    And then it's all fine and you can carry on writing your spying game.
     
    dogzerx2 and Tomnnn like this.
  31. Tomnnn

    Tomnnn

    Joined:
    May 23, 2013
    Posts:
    4,148
    I saw that suggestion coming, haha.

    and this, too.

    A wonder of computer instruction sets is that even a monoglot (like me) can use them. I think that the way people speak with improper grammar but know the nouns and verbs they need to communicate when learning a new language indicates that learning programming languages as is would be easier than learning an entire human language just to program :p
     
    dogzerx2 likes this.
  32. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    Natural languages are ambiguous, always. That's why e.g. mathematics has its own language to avoid that. That's why programming has its own languages too.
    I have a question regarding your idea. Let's assume someone has created an application with the approach you mentioned. Now someone else wants to pick it up. How does the computer explain that person how the application works? And how can that person extend the application?
     
    Tomnnn likes this.
  33. Aurore

    Aurore

    Director of Real-Time Learning Unity Technologies

    Joined:
    Aug 1, 2012
    Posts:
    3,106
Thread Status:
Not open for further replies.