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

Seriously I need help.

Discussion in 'Scripting' started by FuryofPhoenix007, Mar 10, 2013.

  1. FuryofPhoenix007

    FuryofPhoenix007

    Joined:
    Mar 10, 2013
    Posts:
    3
    Pro people out there...


    I am a newbie to this site. I want to create games that are FPS and TPS. And I would like to learn scripting languages so that the game I created can be my own. Could you please tell me which all languages are necessary for scripting in Unity and some resources for learning those languages.

    Thanks in advance for your help.
     
  2. uberokeer

    uberokeer

    Joined:
    Mar 8, 2013
    Posts:
    3
  3. EliteMossy

    EliteMossy

    Joined:
    Dec 2, 2012
    Posts:
    513
    If you have never used JavaScript(UnityScript), then best to jump straight for C# as it is a far better language.
     
  4. GrandMasterHsu

    GrandMasterHsu

    Joined:
    Jul 5, 2012
    Posts:
    50
    i agree with Elite. JavaScript is probably easier to learn but C# is a language that would get you further. i'd highly advise learning C#
     
  5. Unitraxx

    Unitraxx

    Joined:
    Feb 4, 2013
    Posts:
    25
    I knew both Javascript and C, still I chose for javascript. I don't really see why C# is better.
     
  6. EliteMossy

    EliteMossy

    Joined:
    Dec 2, 2012
    Posts:
    513
    C# is a type-safe language, it allows for safer code.
     
  7. Unitraxx

    Unitraxx

    Joined:
    Feb 4, 2013
    Posts:
    25
    That's convenient, but that doesn't make it better?
    It's not faster, and I don't think it 'allows more'.
     
  8. Themp

    Themp

    Joined:
    Nov 8, 2011
    Posts:
    96
    It also gets you further into programming because C# is used in alot of things and javascript only for webbased things
     
  9. BFGames

    BFGames

    Joined:
    Oct 2, 2012
    Posts:
    1,543
    Things like delegates saved my life many times.

    C# is better in my opinion.
     
  10. Unitraxx

    Unitraxx

    Joined:
    Feb 4, 2013
    Posts:
    25
    I'm not going to be a javascript fanboy here (unityscript actually : without the decent OO support it would be rubish for these kind of tasks), but I think people underestimate it.

    It can be perfectly possible, that I decide to use C# for some scripts. (But didn't have to do that yet)
    Whatever floats my boat!
     
  11. kablammyman

    kablammyman

    Joined:
    Nov 22, 2010
    Posts:
    507
    actually, C# is faster and it does allow more. there are threads on this board with side by side tests to prove both. I'm too lazy to do the search for you, but the info is out there.

    I also dont see how unityscript is easier to learn. I asked this before in other threads, and nobody can give an answer. I guess being ambiguous and doing things in a haphazard manner is easier...but i dont see how chaos is easier than structure.

    So, OP, jump into C#. There is a lot of info for C#. Books, websites, other game engines, etc. unityscript isn't even a documented language. unityscript is a large waste of time, avoid it, and take this time to learn the fundamentals of programming with C# as your first language.
     
    Last edited: Mar 10, 2013
  12. Foam

    Foam

    Joined:
    Jun 13, 2012
    Posts:
    322
    Type safety is a crutch. If you don't even know what data structures you're passing around then type checking isn't going to save you. :)

    In any case, write in whatever, OP. It's more important that you pick a language that suits you than to pick a language on its own merits. They're all using the same libraries and they all compile down to the same byte code (well, within reason).
     
  13. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    Unity doesn't use Javascript, it uses Unityscript. It's type-safe, it's about as fast as C#, and it has things like delegates, generics, etc. Both languages have some features that the other lacks. The C# vs. Unityscript argument has been done to death, so please let's not repeat the same thing for the nth time.

    --Eric
     
  14. Foam

    Foam

    Joined:
    Jun 13, 2012
    Posts:
    322
    Yeah, C# is faster. Almost entirely due to the type system. It's usually not an issue though... if you're that hard up for cycles you probably want to write that code in C anyway.

    I'm happy to trade speed for dynamic typing any day.
     
  15. kablammyman

    kablammyman

    Joined:
    Nov 22, 2010
    Posts:
    507
    i would love it if C was supported by unity.
     
  16. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    Only if you deliberately use dynamic typing, which isn't supported on all platforms, and is discouraged anyway (since 3.5 where #pragma strict was added to the default script template). There were a couple of cases in the past where C# was faster because of issues with the Unityscript compiler (such as multidimensional arrays), however those have been long since fixed.

    --Eric
     
  17. Foam

    Foam

    Joined:
    Jun 13, 2012
    Posts:
    322
    You can access native code in the Pro version just fine.
     
  18. kablammyman

    kablammyman

    Joined:
    Nov 22, 2010
    Posts:
    507
    no you cant. i am a pro user. I can make a dll with C++, and have unity use it, but thats not really the same thing as having C or C++ being a supported language in unity.
     
  19. EliteMossy

    EliteMossy

    Joined:
    Dec 2, 2012
    Posts:
    513
    He did state You can access native code. Read before commenting.
     
  20. kablammyman

    kablammyman

    Joined:
    Nov 22, 2010
    Posts:
    507
    cute.

    i did read what he said. when he said "access native code", I read that as he meant that i can see/modify the soruce of unity.
     
  21. GrandMasterHsu

    GrandMasterHsu

    Joined:
    Jul 5, 2012
    Posts:
    50
    how did this go from giving a quick advice of which how to get started with game design/coding to which is better. i'm sure we have enough information above for OP to decide what he would like to learn.