Search Unity

Which programming languages i should learn before starting with unity and others engines?

Discussion in 'Getting Started' started by ManiSalcedo, Jul 21, 2015.

  1. ManiSalcedo

    ManiSalcedo

    Joined:
    Jul 21, 2015
    Posts:
    2
    I know that i have to now how to program, but i dont now if i have to learn and specific languages for unity, or if every one will work, and if the language that i learn will work in others engines, or i have to learn diferent programming languages for diferent engines. Also i want to know if, in case that i could learn any language and use it in any engine, the language i choose would make be able to be run in any plataform, or would be incompatible for some plataforms (android, xbox, pc...), and in that case of that i could learn any language, which one would you recommend?
     
  2. Simpso

    Simpso

    Joined:
    Apr 20, 2015
    Posts:
    158
    Unity uses C# and has a clever feature which will manipulate your game to work on most platforms with little effort from yourself.
    I would say just satrt using Unity witht he tutorials as this will teach you the basics of C# programming.
    Overall programming isnt that difficult once you get past learning the syntax.
    The difficult part is the thinking around problems you come accross, but again that becomes easier with time.
     
    FadiGames, ManiSalcedo and JoeStrout like this.
  3. Schneider21

    Schneider21

    Joined:
    Feb 6, 2014
    Posts:
    3,512
    C# is a great language to learn first. I learned Java as my first Real Programming Language, and that's pretty much cousins with C#.

    Obviously, C# has the advantage of working well with Unity, which I'm assuming you're interested in if you're posting here. And like Simpso said, you can write pretty much all your code once and build for different platforms.
     
    FadiGames, ManiSalcedo and JoeStrout like this.
  4. james_m_russell

    james_m_russell

    Joined:
    Jun 2, 2015
    Posts:
    25
    once you learn the details of a programming language, it's relatively simple to apply that knowledge to a new language.

    if you learn C# first (which i think is a great first language) learning java, C++ or really any other object oriented language will be relatively easy.

    this is because most languages use the same concepts: loops, functions, variables, classes etc. each language may do it slightly differently, but that is a simple google search. many concepts will translate into a scripting language as well, like VBS or Javascript.

    So focus on learning as much as you can about C#.

    *edit

    Since unity uses C#, you can use unity as a leaning aid. do a unity tutorial, then learn about what is in the scripts (C# code). you can then go back and forth between learning concepts, and applying them in unity. you don't need to "master" programming before you start learning unity.
     
    ManiSalcedo, Ryiah and Schneider21 like this.
  5. Schneider21

    Schneider21

    Joined:
    Feb 6, 2014
    Posts:
    3,512
    I started editing my post to say exactly this, but got distracted. To add to it, there's no wrong language to learn first. Anything you learn from one will benefit you in others, even if their constructs and syntax are totally different. The hardest thing initially is teaching your brain to think like a programmer. Once you get that down, it's just learning syntax (which half the time, I end up Googling anyway).
     
    ManiSalcedo likes this.
  6. jhocking

    jhocking

    Joined:
    Nov 21, 2009
    Posts:
    814
    Unity uses C# so that is one obvious choice to start. The tutorials in the Learn section of this site include programming basics.

    However there exist some great (possibly better?) learning materials for other languages, so my personal recommendation is to start learning whichever is easiest. Switching to C# later is pretty easy, and anyway I'm not necessarily talking about a lot later; just do the first few learning modules at https://www.codecademy.com/ in a weekend and then you know enough to dive into using Unity.

    Once you know a little programming, my book Unity in Action is a great resource!
     
    ManiSalcedo likes this.
  7. ManiSalcedo

    ManiSalcedo

    Joined:
    Jul 21, 2015
    Posts:
    2
    Thanks for the answers, im going now to start learning C#, but still dont know if i can use any other language on unity, and if im going to use another one, like GMS, will C# work, or i should learn another language?
     
  8. Ness

    Ness

    Joined:
    Oct 1, 2012
    Posts:
    182
    Unity's JavaScript is imho easiest to start scripting, plus everthing you'll learn using it translates to C#.
     
    ManiSalcedo likes this.
  9. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,183
    At one point Unity had three scripting languages - C#, UnityScript, and Boo. Boo never really took off though and it was deprecated with Unity 5. Technically you can still use it, but the documentation no longer touches on it and you cannot create a Boo script inside Unity (you have to manually add them).

    Out of the two remaining languages, C# is the predominate one by far with over 80% of the user base. All but a few of the tutorials in the Unity Learn section are built around using C#. You're still given the equivalent in UnityScript, but you're forced to figure out any differences yourself.

    Speaking of differences, the C# within Unity is the same as C# outside of Unity. UnityScript though is not the same as JavaScript but is merely a variant based on it. It can be hit or miss as to whether code written in JavaScript will work as UnityScript and vice versa.
     
    ManiSalcedo and Schneider21 like this.
  10. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    4,436
    As far as I know GMS uses GML and since that is used nowhere else (again: as far as I know), I doubt that would be a more worthwhile time investment than learning C#. I never learned any language really in depth but so far I could get stuff working with everything except C++, which I found super confusing. I have heard people advise against starting with C++ as your first language and I can see why. Just play around with unity and learn C#. Learning programming concepts the first time really is a way bigger deal than switching to another programming language later in your career. So (imho) just pick C# and don't worry too much about making the wrong choice.
     
    ManiSalcedo likes this.
  11. Deleted User

    Deleted User

    Guest

    I wouldn't say C++ is confusing as such, but in a lot of areas definitely un-necessary.. Generally most confusion comes from pointers, garbage collection / memory management and header files. Once you get past that it's pretty simple..

    You have to remember, Unity's C# isn't quite C# in general. It's component based, when I used things like OpenTk C# (OpenGL .NET) it was more akin to C++ than it was to the C# I used with Unity.

    I've been doing C++ for years and I actually was very confused the first time I used C# in Unity.

    A lot of the concepts are the same sure, but it's not necessarily one to one.

    P.S the biggest issue you will find is not the language, but the API whether you learn Unity or Unreal / CE that's the hard bit.
     
    Martin_H likes this.
  12. janethorne

    janethorne

    Joined:
    Dec 2, 2015
    Posts:
    10
  13. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,183
    Just keep in mind that Boo's current status means two basic things. First, it may be completely removed at some point and any scripts written in it will have to be ported to an alternative language. Second, it may not receive any attention from Unity (ie no new updates, no documentation, etc).

    Unless you're already familiar with the language and will not be migrating to newer releases with your current projects it's simply not a smart choice of language. If you're going to pick the underdog, at least pick UnityScript.
     
    janethorne, Adam-Buckner and Martin_H like this.