Search Unity

C# vs JavaScript For 100% Noob

Discussion in 'General Discussion' started by neo_sluf, Oct 26, 2014.

  1. neo_sluf

    neo_sluf

    Joined:
    Oct 23, 2014
    Posts:
    19
    So hello guys another C# vs JavaScript. I read a lot of this but I didn't understand much of there answer so I will rephrase the Question.

    So first of all I am a mod developer and I am creating mod using the Warcraft III Game Engine and I am using their GUI Scripting for almost 4 years.

    I am a 2nd year college and my course is Bachelor in Secondary Education. So yeah I am a future teacher not a programmer sadly.

    My Goal: To be a teacher and have a stable job
    My Dream: To be one of the best game developer
    So I want to Teach and Code.

    So I am very noob to this C# and Java.

    So my I ask.. which is better C# or Java/unityscript when it comes to...

    1) learning starting how to code
    2) beginner friendly
    3) creating less mistakes
    4) uses (like aside from unity you can use it in another programs)
    5) available resources and tutorials
    6) wide variety of uses in different game genres
    7) creating a foundation for your future computer programming.
    8) using the full potential of Unity (I heard that Java sometimes mess up or like that)
     
  2. JovanD

    JovanD

    Joined:
    Jan 5, 2014
    Posts:
    205
    They're kinda the same(vary similar) if you ignore the Java's intellisense, and trust me you have to ignore/not use it if you wanna learn to code properly. So considering that you should just go with C# since it has most tutorials and is more used.
     
  3. neo_sluf

    neo_sluf

    Joined:
    Oct 23, 2014
    Posts:
    19
    Thank you...
     
  4. ippdev

    ippdev

    Joined:
    Feb 7, 2010
    Posts:
    3,853
    If one has had ECMA or ActionScript experience you can hit the ground running with UnityScript. If you have not scripted prior then C# may be the better bet. When looking for answers to C# ignore MSDN and the C# bloggers who write business apps for the most part. They seem to have this idea that everybody creates some kind of boring business app. I often have had to fix some clients game and mostly it seemed due to the previous coder painting himself in a corner from cut and pasting from these kinds of sources and attempting to alter the variables for game engine work..So when searching for answers make sure to tack Unity3D on the end of your query or stick to the forums or Unity Answers. If you are going to teach it you may want to be conversant in both languages.
     
  5. neo_sluf

    neo_sluf

    Joined:
    Oct 23, 2014
    Posts:
    19
    Thank you for that answer.

    Additional question..

    Do you think, I can be a good game developer if I spend 1 - 2 hours in learning everything in developing a game everyday?..


    I can't find a helper to help me to develop a game so I decided I need to learn modeling. So do you think I can learn modelling while learning scripting and designing a game?..
     
  6. npsf3000

    npsf3000

    Joined:
    Sep 19, 2010
    Posts:
    3,830
    Particularly do this if you wish to make your life as hard as possible. I mean, why would one possibly want to learn from fellow developers or the guys who built the language and libraries that you're using?

    There's a big difference between blindly copying and pasting code and *hoping* it will work, and using a wide range of resources. Just because you've encountered the former doesn't mean the later is somehow to blame.

    ------

    At OP in most if not all metrics (including those you listed) C# is superior - for good reason. C# is a mature, well supported and established language with multiple implementations used by ~10 million developers. Unity Script on the other hand was created by Unity (probably to attract JS/AS developers), appears to have little to no ongoing development and largely resembles a reduced version of C#. It's not used outside of Unity and even with Unity is at best on par with C#.
     
    landon912 likes this.
  7. npsf3000

    npsf3000

    Joined:
    Sep 19, 2010
    Posts:
    3,830
    For what you want, sure! Just understand that game development is a pretty big field. If you decide to make lots of small games (and make sure to release them!) then you can grow and learn game by game.
     
    inafield likes this.
  8. neo_sluf

    neo_sluf

    Joined:
    Oct 23, 2014
    Posts:
    19
    npsf300 thanks for the answer..

    Yeah I was thinking of that too... they said that Java Script is different from Unity Script. So if I will learn Unity Script I can't use it really outside when using Java since they are different (not so much).

    Is the C++ is replaced with C# or both of them are different?.. just want to know..
     
  9. ippdev

    ippdev

    Joined:
    Feb 7, 2010
    Posts:
    3,853
    There is enough quality C# Unity based tutorials, blog entries, downloadable examples and github etc. frameworks out there that gives a precise answer in search engine queries of most of the questions one might have about a particular syntax, method or explanation of a piece of code one is trying to understand. It may be, depending on how and why you want to learn your role in the use of the game engine, the most valuable use of one's time in quickly grasping the peculiarities of Unity versus business apps would be to go straight for the meat on the bones. Using the same metaphor, and referencing your avatar obliquely again, then when one's hunger is sated and one can have things doing what you want, and understand in the game engine itself, one can then discern the skeletal structure by going through all the classes at MSDN.. To learn Unity it would seem to me that this will make life easier.
     
  10. npsf3000

    npsf3000

    Joined:
    Sep 19, 2010
    Posts:
    3,830
    Which is entirely true, where did I say one should not favor Unity sources for Unity related questions?

    However there are times where Unity sources are non-existent, inadequate, hard to find or simply too narrow sighted to be of much use. As a trivial example, I want to learn how to format a number (e.g. 1.01.ToString("N3")). This ability is documented in MSDN clearly, and used by business developers all the time. Good and comprehensive resources by Unity developers? I'd be surprised - none popped up in my quick google.

    And of course, the OP is clearly interested in non-Unity applications which clearly favors him at least being aware of these other resources and frameworks/engines/fields - quick console applications are great for learning, teaching and automating simple tasks he may face in his job for example. In addition, they'd help him learn the difference between language, library and engine.

    Your intent may have been right, but your wording is wrong - maybe 'favor unity sources first' would be a better description.

    C++ is an entirely different beast and not necessary for anything you're currently doing. Some googling will tell you plenty about it. Some suggest it as a beginner language because it's lower level... but it's more complex, confused and less relevant to much of general development so I'm not sure I agree it's hugely relevant. If you wanted to become a professional developer in a large company working with legacy/performance critical code then I'd consider it more.
     
  11. Cogent

    Cogent

    Joined:
    May 14, 2013
    Posts:
    356
    Yes, and Yes!

    You'll be fine! There are so many tools, languages, engines and other resources out there (as you already know) that your main concern is not can I do something , it's almost which tools would be the most fun to learn/use!

    Remember to have fun with it. :)

    ( careful... language fan bo... um... language enthusiasts, can be very religiou... um passionate about their chosen languages and dialects ) :p
     
    inafield likes this.
  12. Nubz

    Nubz

    Joined:
    Sep 22, 2012
    Posts:
    553
    C# made more sense to me and I'm not sure why.
    By the time I started using Unity I had already read through C# For Dummies also.
    I still 3 years later need to constantly look things up and ask for help all the time though haha.
    Best Of Luck To You.
     
  13. ippdev

    ippdev

    Joined:
    Feb 7, 2010
    Posts:
    3,853
    Throwing one's self at every aspect of the pipeline is a good way to grasp what has to be accomplished and the relative difficulties of the various tasks per your natural skill set. A couple of hours a day will not give you much. You really have to sit down and throw yourself at a complex project to get a grip on to. Make your own..not complex by RPG standards but complex as in using all the various parts of the basic engine..art pipeline, animation clip setup, Mecanim setup and scripting, audio pipeline, both 2D and 3D, UI design to provide an intuitive interface to your game or sim or application. For modeling, if you have art chops already then you may be able to do better than programmer art easily, however, if not then that itself is a multi-year discipline and a whole pipeline to be learned with it's own peculiarities and knowledge set, especially character design and rigging. Most scripting will be setting boolean switches, setting and getting various game play variables for keeping track of state, looping to find objects amongst arrays and creating functions to handle all the various encapsulated groupings of the above you will need to create the ongoing dynamic gameplay.
     
  14. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,191
    The only reasonable excuse for writing a single piece of UnityScript code is if you need to talk to other UnityScripts written by someone else. And even then there are ways to facilitate communication without having to resort to writing UnityScript.

    UnityScript and C# are both object oriented languages, meaning once you learn the principles of how to code in one, you should be able to code in the other. Yes, there are semantical differences to declaring variables/methods/classes, etc., but that's not too hard to learn.

    So why do I say choose C#?

    1) You will find it much easier to find help, as a lot of issues have already been raised/solved by other users of C#. The amount of resources for C# far exceeds the amount resources for UnityScript (remember, UnityScript and JavaScript are similar, but not the same).

    2) There are limitations with UnityScript that don't exist with C#. What are those limitations? I honestly can't remember, as it's been so long since I developed in UnityScript. Perhaps they've been addressed (doubtful). I think most of them are in relation to more advanced coding practices, which might make you believe that you don't need to worry about them, as you're a beginner. But remember, you won't always be a novice. If you keep with it, at some point you will hit a roadblock with UnityScript!

    Oh, and if you use C#, you also get to use Visual Studio. There are some hoops you have to jump through to get Unity working with Visual Studio Express, but it's well worth it in my opinion. Again, I can't really remember why MonoDevelop is so bad (someone else chime in?), so I'm basically asking you to trust me on this one, but . . . well, just trust me!
     
    Ryiah likes this.
  15. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,144
    I've been using a method I found on a site where you replace the Unity MonoDevelop executable with a custom one that interacts with Visual Studio Express. Its been doing alright for what I've needed.

    http://www.pipefantasy.com/?p=1303
     
    gilley033 likes this.
  16. neo_sluf

    neo_sluf

    Joined:
    Oct 23, 2014
    Posts:
    19
    Well I can't afford Visual Studio Express..
     
  17. npsf3000

    npsf3000

    Joined:
    Sep 19, 2010
    Posts:
    3,830
    You can't afford free?
     
    Meltdown likes this.
  18. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    1. Don't need special ide
    2. use C#

    It's actually dumb to use anything except C# with unity considering only some 18% use it, and Unity is slowly depreciating it while moving all examples and docs to C#.
     
    calmcarrots and randomperson42 like this.
  19. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,144
  20. Meltdown

    Meltdown

    Joined:
    Oct 13, 2010
    Posts:
    5,822
    Visual Studio + C# = Easiest to learn and pick up on syntax.

    The intellisense Visual Studio provides with C# is a lot more helpful than the intellisense you would get using UnityScript or MonoDevelop.

    And when you have some money to invest, buy Resharper, which is an extension for Visual Studio which makes you even more efficient at writing code.

    C# is used world-wide, in many industries, whereas UnityScript is not.
     
    calmcarrots and npsf3000 like this.
  21. gilley033

    gilley033

    Joined:
    Jul 10, 2012
    Posts:
    1,191
    I use the same method. I'm curious, have you tried placing a UnityScript file in a folder called Plugins and communicating with it from a C# file? It should work, but it doesn't for me, and I'm trying to figure out if it has something to do with the pipe fantasy method.
     
  22. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,144
    No, but then I've never had to use any UnityScript files. I tend to avoid them on the asset store if possible.
     
  23. inafield

    inafield

    Joined:
    Feb 26, 2013
    Posts:
    281
    Avoid UnityScript. Avoid assets that use UnityScript. I'm a javascript and C# developer by day, and seriously... stay away from UnityScript. It's not worth the headache especially when you're first starting out.

    Visual Studio Express is free and will be a big help. I think I read somewhere that UnityVS will eventually be coming to Express.
     
  24. GoesTo11

    GoesTo11

    Joined:
    Jul 22, 2014
    Posts:
    604
    Ryiah and inafield like this.
  25. yaapelsinko

    yaapelsinko

    Joined:
    Nov 16, 2013
    Posts:
    102
    C# is better than JavaScript.

    JavaScript's actual name is "God forgive us JavaScript".
     
    calmcarrots and inafield like this.
  26. neo_sluf

    neo_sluf

    Joined:
    Oct 23, 2014
    Posts:
    19
    Guys i need help.

    Can someone link me a C# in Unity Tutorial in pdf cause i can't be online always... all Unity Script tutorials are in JavaScript and really annoying..
     
  27. inafield

    inafield

    Joined:
    Feb 26, 2013
    Posts:
    281
    @neo_sluf, all of the Unity Learn content is first done in C#. If you're using Chrome, you can save/print as "PDF".
     
  28. Meltdown

    Meltdown

    Joined:
    Oct 13, 2010
    Posts:
    5,822
    And by the lord heavens and almighty above, can somebody who manages the Unity documentation do a Find and Replace and change JavaScript to UnityScript, to nip in the bud the mass confusion and pain the naming has caused many a noob in his early Unity years.
     
  29. calmcarrots

    calmcarrots

    Joined:
    Mar 7, 2014
    Posts:
    654
    Honestly, I would just learn the language first. Don't even bother with the engine yet. Learn C# by itself or else you might get very confused with learning the engine and the language. Also, you will learn a lot more about C# than you would using only Unity because you would be limited with what Unity has to offer.
     
    inafield and Cogent like this.