Search Unity

Learning an actual language

Discussion in 'General Discussion' started by Duskling, Jun 14, 2012.

  1. echtolion

    echtolion

    Joined:
    Jun 16, 2011
    Posts:
    140
  2. Khyrid

    Khyrid

    Joined:
    Oct 8, 2010
    Posts:
    1,790
    I wanted people's opinions of what exactly they valued about the language, not technical specifications that I will never learn 90% of anything about in practical use.
     
  3. jedy

    jedy

    Joined:
    Aug 1, 2010
    Posts:
    579
    There are a couple of great ways to run the whole thing ( Visual Studio ) on Mac. Some friends of mine even prefer it over Windows, because it were faster ( They're just overcompensating for the money they've spent on the Mac :D ).

    Anyway with the proper virtualization software you can get your windows stuff on Mac including visual studio - virtualization software technology on the CPU ( 2006 + ) and newer Mac ( 10. + or smthing ) are the things you need. It can leech a bit more ram, but with the laptop capacities these days I don't consider it much of a problem.

    If you're in for the free stuff you can go with :

    https://www.virtualbox.org/
    A virtual Windows == Excellent VS

    http://www.vmware.com/products/player/
    Great one - I think it even supports seamlessly integrating the other OSs windows as regular applications.

    Besides that there is a Wine application which works perfectly fine on Macs too ( even though it might be a lot more trouble )

    And the 2 ultimate solutions which aren't that free, but I would buy them if I were to develop on a Mac:
    http://www.parallels.com/eu/products/desktop/
    http://www.vmware.com/products/fusion/overview.html
    Basically the same thing - you run windows apps as Mac apps without too much hassle.


    PS : Java isn't bad, the syntax is nice and smooth and it's pretty easy. But C# is faster and has a handful of stuff over it, take that and they'll look the same.
     
  4. Khyrid

    Khyrid

    Joined:
    Oct 8, 2010
    Posts:
    1,790
    I just want to know what some of that stuff is? Is it because C# has Lifted (nullable) types as a data type and java doesn't? What does it mean?
     
  5. kablammyman

    kablammyman

    Joined:
    Nov 22, 2010
    Posts:
    507
    if you want to work in the industry, C++ is the language to know. Even if you wont use C++ for your actual job, you will prob need it for your interview tests. However, this is for the bigger companies who do console and PC gaming. You will need C++ to make the game or be a tools programmer. If you work for a smaller team/company, they will more likely have a game engine to use since they don't have the time (not enough money to pay employees for longer dev cycle) or the experience to make a nice game from the ground up. But also, that lack of money may force them to make things from the ground up as well...no funds to license tech...or maybe they like doing things themselves since they have complete control.

    Also, on a personal note, making a game from the ground up is very rewarding. I def dont get the same feeling when using unity. I dont get why people said not to do it...a short while ago, that was the only way to make games. Who cares if you never finish a personal-made-for-fun game if the goal is to learn and improve your skillset. I also feel like I'm losing skill when I let an engine or a managed language do everything for me..its just so easy to forget or stop caring about details. I also do get to learn how to implement certain systems if the game engine does it for me. Any technician can learn how to use a system, but an engineer designs the system!

    With that said, Unity (as well as any game engine) does save me time to get right to making games, and that's why they are important. also, I cant do graphics as well as the guys who make unity, unreal, cry engine, etc, so its good to leverage their know-how. But, if these things don't matter to you, then who cares, I just giving my opinion since I'm more of a programmer than a "games programmer" so YMMV. IMO, making a game from the ground up is like teaching a man to fish, as opposed to giving him one.
     
  6. jedy

    jedy

    Joined:
    Aug 1, 2010
    Posts:
    579
    Well it's all about convenience for me actually.

    In Java the input class I've had, had me to create a ton of classes to handle all kinds of inputs, even the simplest ones.
    In C# I just use a function pointer aka delegate and implement the functions wherever I need them.

    My networking thread in Unity is pretty cool, but It can't actually use anything from Unity. That's why I use coroutines. They're cool and all ( and probably could be achieved in java, too with some work ).
    The thing is that my coroutines usually wrap up just a function call or two-three lines of code. I use lamba expressions or anonymous functions - simple.
    In Java I would've had to create a separate function for each of these calls, that's a hundred or more 2-3 lined functions.

    Imagine this:
    Dictionary<uint, List<string>> urls = new Dictionary<uint, List<string>>();
    I say the exact same thing twice on the same row.
    In C# I go:
    var urls = new Dictionary<uint, List<string>>();
    The compiler fills the rest for me ( which isn't that hard actually ).

    Another fancy thing is LINQ - with lambda expressions and LINQ syntax I could easily sort, find or manage any amount of data. It will even look nice and tidy in my code. And as it turns out it's rather fast.

    Structs, outs and refs - those give you way better control over your code.
    In Java you basically pass everything by reference, besides base types, but there are some other rules that apply and the whole thing might be a little confusing if you're not used to it.
    In C# you have 2 rules - structs - passed by value, classes - by reference ( a bit more to that but that's roughly it ).

    Unsafe code. Java has it's virtual machine, C# has the CLR. Both are funky, manage your memory and save you the headache. Big time.
    But sometimes you may need the additional bit of speed. Unsafe code gives you that - you can basically mess up everything, manage your memory and be a C++ coder for a moment, while still using the C# language to automate pretty much everything else besides that bit.

    Nullable types are pretty awesome, but I've never used those too much ( neither needed anything similar in Java ), so I don't take it as a big red dot on the C# board.

    Those are the primary reasons I've chosen C# over Java ( even though I could've went with the python-like Boo or js even easier ). Take those and a couple of other things away and C# and Java are the same thing.
     
  7. Sirex

    Sirex

    Joined:
    Feb 7, 2011
    Posts:
    77
    Don't spend a lot of time learning the standard c++ or Java.
    Instead you should expose yourself to Haskell, Scala and Boo.

    Richer programming concepts and you get exposed to modern seperation of concern with traits and proper implemented aspects instead of the old static oo inheritance chain of doom.
    Typeclasses for example frees up a lot of inherit chains which you can implement via interfaces.

    If i am looking for work i won't look for an employer that expects me to sacrifice my spare time for job training. There is a difference between programming and Software development, the first is understanding concept, the second also implies knowing the environment, the compiler, how the language compiler chains advantage and disadvantage which is highly relevant for production systems.
     
    Last edited: Jun 17, 2012
  8. VeraxOdium

    VeraxOdium

    Joined:
    Jul 2, 2011
    Posts:
    233
    Who the hell makes games in Java? I know.. there is a market, but why not go after the big fish?
     
  9. jedy

    jedy

    Joined:
    Aug 1, 2010
    Posts:
    579

    I do! My very first playable game was in java. In the 10th grade.

    Spoiler : It's TOO awesome.
    http://www.youtube.com/watch?v=e6XCgoam6VU
     
  10. adaman

    adaman

    Joined:
    Jul 5, 2011
    Posts:
    97
    Notch
     
  11. Rico21745

    Rico21745

    Joined:
    Apr 25, 2012
    Posts:
    409
    Oh dear lord.

    I swear, if I see someone type Java instead of "JavaScript" my head will explode.

    Folks, there is a difference. Java is a completely different language than JavaScript.

    Is learning Java worth it? Depends on what you're building. Can you use it in Unity? No.

    Can you use Javascript in Unity? Yes, they have their own version of it called UnityScript. This is also *not* the same as Javascript, which is the scripting language used on your browser to do a lot of the client-side logic (and fancy effects).

    UnityScript is not portable outside of Unity. The basic syntax may help you learn other more useful languages later, but on its own, it is not really very valuable to learn compared to C#, which has a lot of different applications and is a widely known and supported language.
     
  12. n0mad

    n0mad

    Joined:
    Jan 27, 2009
    Posts:
    3,732
    JavityScript.
     
  13. jedy

    jedy

    Joined:
    Aug 1, 2010
    Posts:
    579
    Who is talking about javascript?
     
  14. Duskling

    Duskling

    Joined:
    Mar 15, 2011
    Posts:
    1,196

    We are talking about Java. Not Javascript. I'm pretty sure we all know they are very different.
     
  15. Rico21745

    Rico21745

    Joined:
    Apr 25, 2012
    Posts:
    409
    Then I must have gotten confused, because you said you were using Java to develop in Unity. Which boggles my mind to great extents.

     
  16. VeraxOdium

    VeraxOdium

    Joined:
    Jul 2, 2011
    Posts:
    233
    You also said you didn't want to learn C# because you wanted to learn XNA, isn't C# the only option for that?
     
  17. Khyrid

    Khyrid

    Joined:
    Oct 8, 2010
    Posts:
    1,790
    I was talking about the script I use when I click make new javascript in the unity editor, whatever the fack that is = what I was talking about and I think it should be obvious that is what everyone is talking about as this is a unity forum.