Search Unity

Just starting out and wondered if Python is a good choice or plain ridiculous

Discussion in 'General Discussion' started by MaverickMode, Aug 14, 2015.

  1. MaverickMode

    MaverickMode

    Joined:
    Aug 14, 2015
    Posts:
    24
    Wow, I didn't know .us is this robust. I am not changing my mind from C#, I still think it's a very important stage of programming, it's a must know. Though I am going to give Unityscript a fair shot too now.
     
  2. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,147
    I had to dig around for a bit before I actually found out what Unitron was. There are far too many products under that name.
     
    MaverickMode likes this.
  3. ippdev

    ippdev

    Joined:
    Feb 7, 2010
    Posts:
    3,853

    It was the original text editor I started with in Unity 2.6.1. It is fast, hilites most syntax and Unity specific stuff and no bells and whistles that get in my way. I spend more time thinking about the logic chains for what i am going to write and then a few seconds writing the lines. Popup help is just annoying when you know what you want to write..and do not autocomplete my stuff. I will complete it just fine thanks. I came from a 10 year ECMA/AS1-2-3 component based background prior to using Unity so it was a natural for me to use UnityScript. I just drag Unitron from Unity update to Unity update and set it in preferences. I have tried several others. I won't touch MonoDevelop. It has absolutely raped some of my projects and set me back hours trying to figure out why it did what it mysteriously does. And frankly the old Unitron hilites and colors more syntax and types than MD. Unitron does one thing and one thing well..for me. YMMV.
     
    Ryiah and MaverickMode like this.
  4. Ony

    Ony

    Joined:
    Apr 26, 2009
    Posts:
    1,977
    Five of the games I've released over the past 15 years have been heavily focused on sexuality, which is bad in America, so I tend to stay under the radar. Check my sig or send me a PM and you'll find my latest game with no trouble.

    I was subcontracting with the main developer to help create their terrain system, and they relied heavily on Python for some of their code-base. I didn't have to work with it too much because most of the work I did on it wasn't code related, but still enough to get a taste.

    Python is just one of the many languages\systems I've found myself working in over the years. Perl (oh how I adore thee), PHP, C#, UnityScript, BASIC, Javascript, Java, Visual Basic, ActionScript (Flash), C-Script (3DGameStudio), on and on. Lately it's mainly C# and PHP (for web sites).

    This is in regards to Playmaker if I'm following the thread correctly. I bought Playmaker to try out and ended up using it a lot because it's so damned simple. It's awesome for quick prototyping. Not so great for big complicated systems like a typical game can get. It has its ups and downs. I've use it mainly for the past few months for tying in to NGUI. It's so easy to catch an event and have it do something without writing specific individual scripts for every button press, but even now I've started going the script route since it's easier for me to keep track of everything in code than it is in Playmaker. It can get out of hand quickly. Highly recommended for quick prototyping or for people who just simply don't want to learn to code, but I wouldn't recommend it for large projects.

    Cheers to that. :)
     
    Tomnnn, Kiwasi and MaverickMode like this.
  5. ippdev

    ippdev

    Joined:
    Feb 7, 2010
    Posts:
    3,853
    As Eric stated..it is great for rapid prototyping. Knowing both is a benefit and I will code in C# if asked to for a project, but given my own druthers I can get it done much faster in .us. Like typing this post..it is muscle memory after I know what I am going to want my functionality to accomplish.
     
    Ony and MaverickMode like this.
  6. ippdev

    ippdev

    Joined:
    Feb 7, 2010
    Posts:
    3,853
    I have used it and found it bogged my framerates down horribly after getting say ten or more PlayMaker setups running..and it bloated the final compile size. I eventually tore it out of those projects and replaced their functionality with a few lines of code and retrieved 50 or more frames per second back and dropped many MB from the final compile size..
     
  7. Ony

    Ony

    Joined:
    Apr 26, 2009
    Posts:
    1,977
    ^ Exactly my experience.
     
    ippdev and MaverickMode like this.
  8. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,147
    Right, I wasn't bashing it. I simply couldn't find any actual information on it aside from the old Unity wiki entry. I definitely agree with you that MonoDevelop is terrible. If it weren't for Visual Studio I would be using Notepad++ or similar.
     
    MaverickMode likes this.
  9. Tomnnn

    Tomnnn

    Joined:
    May 23, 2013
    Posts:
    4,148
    Once again I'm one of the few people who likes monodevelop. I guess that's good for @MaverickMode to know for understanding the dynamic between all of us. In the future when all of us are present in a forum he can know ahead of time where it's going (~ ͜ʖ°)
     
    MaverickMode and Kiwasi like this.
  10. tiggus

    tiggus

    Joined:
    Sep 2, 2010
    Posts:
    1,240
    Python is a fantastic language, but not for Unity :)

    It is really helpful to know for other things though, a lot of the build systems and toolchains are written in Python or C# I find. Blender for instance has good Python support for automating things.
     
    MaverickMode likes this.
  11. mbowen89

    mbowen89

    Joined:
    Jan 21, 2013
    Posts:
    639
    I can't remember a time that I wasn't told the exact line of an error with C#...?
     
    Ony, MaverickMode and Kiwasi like this.
  12. Tomnnn

    Tomnnn

    Joined:
    May 23, 2013
    Posts:
    4,148
    I use livestreamer which is python... I think.
     
    MaverickMode likes this.
  13. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    Don't choose the languages you use by how much you personally like the language itself or it it's one you know. A good general rule of thumb is look at the problem you are trying to solve, and use the language that most people are solving that problem in.

    In some industries that language might be a choice of several that are close to being equally productive. The web space is one of those. The game industry not so much.

    It's really the language ecosystem that matters more then the language itself. Ecosystems tend to specialize. If I'm looking for a game related library, I can probably find half a dozen in C++/C#. If I look for the same in other languages I'd be lucky to find one. Conversely if I'm writing server stuff, I'm lucky to find one good library in C#, but there are half a dozen in java/ruby/php/etc..

    Don't get hung up on languages. If anything get to the point where learning a new one is second nature. Once you do that the language is just a tool and it won't really matter what language you use, you will just pick the path of least resistance and spend more time actually getting stuff done.
     
  14. ippdev

    ippdev

    Joined:
    Feb 7, 2010
    Posts:
    3,853
    Try it with Unitron. It may be a line 50 or 60 lines above the hilighted line the compiler click took me to. OTOH..Unitron nails the offending line with a bullseye when using .us.
     
    MaverickMode likes this.
  15. ippdev

    ippdev

    Joined:
    Feb 7, 2010
    Posts:
    3,853
    I would like VS for OS X native. I might shift to C#..until then..I stick with the basic tool that stays out of my way.
     
    MaverickMode and Kiwasi like this.
  16. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    There seems to be a vague correlation between the time and platforms people started developing on and their attitude to IDE help/interference. Many older devs insist on coding how they want. Many younger devs can't survive without autocomplete.
     
    MaverickMode and Ony like this.
  17. ippdev

    ippdev

    Joined:
    Feb 7, 2010
    Posts:
    3,853
    I just never liked anyone telling me what to do growing up with an overbearing drill sargeant for a father..and that includes text editors..heh:) Mostly when I write a line of code I have thought about it a great deal and ran the code through my head and surrounding functions as well before I commit to typing. Hence any help is superfluous and just getting in the way of what i know i want to type.
     
    MaverickMode, Kiwasi and Ony like this.
  18. Ony

    Ony

    Joined:
    Apr 26, 2009
    Posts:
    1,977
    I write entire web site php\mySQL\Perl backends in Textpad. Can't stand autocomplete.
     
    MaverickMode and Kiwasi like this.
  19. steego

    steego

    Joined:
    Jul 15, 2010
    Posts:
    969
    I've had it running and executing scripts in Unity, so it works at some level at least. It's been a while since, and it was mostly for experimentation, so I can't guarantee that everything works, but I didn't see any immediate problems.
     
    superpig and MaverickMode like this.
  20. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    I on the other hand am totally addicted to the 3 keystroke method of coding with auto complete.

    Anyway the main point of bringing this up was indicating that I am not yet old. ;)
     
    MaverickMode and Ony like this.
  21. steego

    steego

    Joined:
    Jul 15, 2010
    Posts:
    969
    Please. None of what is written on that page is an objective reason why Python is a bad language, it's all conjecture and opinion. To top it off, it has the tone of a nerd-raging angry teenager. I think Python is neat, if you don't like it then I don't particularly care, but please don't be a hater.
     
    Ryiah, MaverickMode and Kiwasi like this.
  22. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    I went and read the article. I have to agree with you, it's not a particularly good article. It starts off stating that floating point accuracy issues are somehow unique to Python and therefore make it an evil language.

    If you are going to argue for or against an article, using a slightly more scholarly tone is a good idea.
     
    MaverickMode likes this.
  23. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,620
    For a beginner it's far more important to learn programming fundamentals than it is to know any specific language. Once you have those down they're 99% transferrable between most commonly used languages.

    With that in mind, I'd suggest making sure you get yourself a programming fundamentals book and work through that as well as your Unity-specific learnings. I know that sounds like a drag, but loads of people make life far harder than it has to be by treating games programming as a subset rather than a specialisation. If you learn the fundamentals and then* apply them to Unity you'll save yourself loads of time in the long run.

    C# has an excellent, freely available resource called The Yellow Book by Rob Miles. There are many similar resources for C# thanks to its widespread use. I haven't used it myself but I hear consistently great things about that one, and it's free. So click the link and download it now, there's absolutely no reason not to.

    I'm unaware of anything similar for UnityScript. If anyone is aware of a solid intro to programming that uses UnityScript then please share!

    In any case, the technical aspects of whatever language you choose are more or less irrelevant for a beginner. At the basic level most modern programming languages let you give roughly equivalent instructions to a computer. Learning how to use those instructions to solve problems is far more important than learning a particular language's specific syntax, keywords and advanced features. And once you understand how to do that then moving from one language to another gets pretty easy because you're not learning the underlying concepts any more - you're just writing slightly different text to use them.

    * Not necessarily in that order, but definitely as individual dedicated tasks.
     
    aer0ace, zombiegorilla, Ryiah and 3 others like this.
  24. MaverickMode

    MaverickMode

    Joined:
    Aug 14, 2015
    Posts:
    24
    I totally agree with what you said about understanding what is programming before even focusing on either language. I already started learning that a few months ago. I feel a bit more prepared for a programming language as I continue with learning the fundamentals. I guess I don't have my patience. I choose to call it passion rather than being called impatient ;)

    Also thank you for all of the advice and to everyone else who keeps this thread alive. I think we should change its name and make it a sticky for future beginners.

    I will definitely read it more carefully when I am back from work.
     
  25. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,620
    Well, using some language is an important part of learning those fundamentals, it just doesn't so much matter which language.
     
    MaverickMode, Kiwasi and Ony like this.
  26. Tomnnn

    Tomnnn

    Joined:
    May 23, 2013
    Posts:
    4,148
    I grew up without autocomplete but I love it now. I like not remembering things. I'm all CPU and no cache, baby!

    I think it's bad because of (a < b < c). How does python handle it? How does every other language in existence handle it? Python is a little late in the game to invent new standards.

    @angrypenguin do you think PlayMaker would be a good way to learn fundamentals? New programmers these days seem to grasp execution flow of blocks really well.
     
    MaverickMode likes this.
  27. ippdev

    ippdev

    Joined:
    Feb 7, 2010
    Posts:
    3,853
    A study/knowledge of ECMA syntax coupled to the Unity docs. Took me literally 15 minutes to understand how Unity uses UnityScript once I went through the docs and saw their examples. It isn't much diff than reading a non-related C# book and repurposing for Unity and the way it does components by using the docs after you have the base under your thumb.
    .
     
    Last edited: Aug 15, 2015
    MaverickMode likes this.
  28. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,147
    Many beginners seem unable to find the sticky threads that already exist. Adding another wouldn't help much. :p
     
    HemiMG, Kiwasi, MaverickMode and 2 others like this.
  29. steego

    steego

    Joined:
    Jul 15, 2010
    Posts:
    969
    I'm guessing since you think that's bad, you already know python handles it like any mathematician would. I'd hardly call that a new standard, as it's been around in mathematics for ages. And if nobody ever tried to do things in new ways, we wouldn't have any progress at all would we?

    But again, this is just opinion. I think it's perfectly reasonable that programming languages should follow the conventions of math where possible. As I said, I don't really care if anyone else likes python or not, just don't use opinion to argue that it's a good or bad language. If you don't like it, that's OK, just say you don't like it. You don't need to invent some involved arguments for it, and try to use that to convince others that your opinion is the only right one just to justify yourself. Well, not you you, I haven't seen you do this, but in general...
     
    MaverickMode likes this.
  30. Tomnnn

    Tomnnn

    Joined:
    May 23, 2013
    Posts:
    4,148
    A mathematician infers that it is (a < b && b < c). A programmer understands that machines read code explicitly and (a < b < c) is very different from (a < b && b < c). (a < b < c) to a programmer is understood to be ((a < b) < c). I don't doubt that mathematicians would not understand that it's a bad idea for programming languages to infer information, because they are not programmers ;)

    Agreed. But order operations should be explicit. There is no reason for a machine to interpret "a < b < c" like python does unless python does what python does and throw out a standard.

    What? Did you not know that we're on the internet? :p You're supposed to fight to the death over on-the-spot-made-up arguments ad-for-ever-um. And make up words to go along with it. You'll see it less from me because I don't start these scuffles, I just enjoy them when they present themselves.

    I stick to the a < b < c bit because it was the one that annoyed one of my C++ teachers the most. What bothers me the most about python is that (by default, at least) white space matters. And whether that white space is a tab or individuals spaces matters. But I don't think about it very much because the extent of Python usefulness in my life has been "passing CS100" haha
     
    MaverickMode likes this.
  31. thxfoo

    thxfoo

    Joined:
    Apr 4, 2014
    Posts:
    515
    Python is one of the best languages to learn/teach coding.

    Its syntax looks almost like natural language and makes sense. I can show Python code to my GF that is not a coder and she understands what it does normally. While C++/Java are like magic to her...

    Code (csharp):
    1. L = [ "a", "b", "c" ]
    2. for x in L:
    3.   print x
     
    MaverickMode likes this.
  32. steego

    steego

    Joined:
    Jul 15, 2010
    Posts:
    969
    But there is a reason, because that's what you'd expect it to do if you'd never touched a programming language before. There is no standard for programming languages, there are some conventions maybe, but if you're programming in python, you should be aware that you are programming in python and know what it does differently from other languages. Just as you wouldn't try to write pascal when you're editing a c file.

    Oh no, are you saying I've gotten caught up in an internet argument? Well there goes my evening. And I had plans and everything.

    Yeah, well, that's just, like, your opinion, man. This is probably the one I see most often, and I just don't get it. I've never had any problems with this.

    Anyway, the way I see it, programming languages are a lot like natural languages. Different natural languages lets you express yourself in different ways, and even influence how you think. You've maybe heard for example that people who speak languages with a future tense save less money than those who speak languages without, or how french is the language of love.

    Programming languages are the same, the language you use shapes how you solve problems, and knowing many different programming languages lets you think about solving those problems in different ways. Python is often preferred by mathematicians and physicists just because of a < b < c, because it lets them express themselves in a way they are familiar with.

    To me, python feels like a poetic language, because just like poetry, it let's me write just a few lines that are packed with meaning. As opposed to for example java, which feels like writing detailed technical documentation. I don't like perl, because I think it looks ugly, much in the same way I don't like finnish because of how it sounds (no offence finns).
     
    MaverickMode and Tomnnn like this.
  33. Tomnnn

    Tomnnn

    Joined:
    May 23, 2013
    Posts:
    4,148
    Oops, that's what I meant, conventions.

    This are my evening plan!

    Then clearly you've never tried the delicacy that is arbitrary spacing for no justifiable reason.

    The word you're looking for is explicit. Though funny you should say that because Java also has a way for you to comment your code to generate technical documentation... the javadoc tool! The name of that could be better.

    And to coders who's background is not in scripting languages, your code sample is magic because you haven't explicitly defined the types of the variables you're using.

    Look at these different perspectives gawking at each other :p

    Since math came first and programming is essentially just math... I wonder where the divide happened. Who decided a < b < c should be explicit instead of 'natural'? Why did it take until Python for someone to try it? This is my non-researched guess... I assume that the consensus pre-Python was that explicitly defining everything including order of operations so that people would never deal with ambiguity when looking at a piece of code.
     
    MaverickMode likes this.
  34. steego

    steego

    Joined:
    Jul 15, 2010
    Posts:
    969
    You should try the whitespace programming language.

    No, the word I believe is verbose.

    Actually, explicit is part of the python philosophy. Explicit is better than implicit. And pydoc is more built-in and elegant than javadoc.

    I guess it happened when someone had to figure out how to actually parse text into runnable machine code, and I also doubt python is the first language to do it like this. Many other languages handle order of operations differently, like smalltalk that just does straight left-to-right, or lisp which does postfix.
     
    MaverickMode likes this.
  35. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    I've never tried python. I should, just to see what all the fuss is about.

    At a guess the white space issue would bother me. I get frustrated enough with VB and it's lack if explicit line endings. It's not uncommon for me when writing code to randomly change scope by adding in a few extra braces. I can just see myself breaking scope really easily by being forced to rely on white space.

    That said I've never tried it. So don't take my opinion to seriously.
     
    MaverickMode likes this.
  36. thxfoo

    thxfoo

    Joined:
    Apr 4, 2014
    Posts:
    515
    Really? I think who does not understand that example should not be coder.

    How do you write pseudo code if you design an algorithm? I mostly use basically Python (just by accident by writing my ideas), if I read scientific papers about algorithms their pseudo code is basically Python very often. It is just the natural way to write pseudo code/coding ideas.

    Note: I don't say static typing has no place. But for a complete noob Python syntax is easier to understand and use. However, static typing has other advantages for noobs (safety, auto completion, ...). It is not black and white. But if I would teach my GF coding I would teach her in Python first.
     
    MaverickMode likes this.
  37. Tomnnn

    Tomnnn

    Joined:
    May 23, 2013
    Posts:
    4,148
    That's kinda the point I was making. That's the production code, but it looks like pseudocode. And anyone thinking their idea through even a little bit probably would consider what types to use :)

    Oh... right :p My opinions make more sense when people understand I like verbose languages. I've got like a decade in java and I'm only 23. Nearly half my life is java experience. I think I can java better than I can english sometimes.

    Good luck trying to convince me that a scripting language without types is explicit. I'm very racist against scripting languages.

    The fuss should be about that it's a reference to Monty Python, but the fuss is actually about production speed and ease of use.
     
    MaverickMode likes this.
  38. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,147
    Now we know what is wrong with you! :p
     
    HemiMG, Ony, MaverickMode and 2 others like this.
  39. thxfoo

    thxfoo

    Joined:
    Apr 4, 2014
    Posts:
    515
    The types in my example are completely explicit: L is a list of Strings, x is a String.
    But I understand what you mean, if you just see a method/function definition it can be strange to not know what is expected as input (but that means the code is bad or at least badly commented).
    However, there are awesome pieces of Pyhon code, it is much more than a scripting language (same to lesser extend is true for Lua).
    E.g. check out Theano (Python), or Torch (Lua). You will not find something similar powerful or elegant in any other language as far as I know. That is a very specific example from the world of neural nets. There are countless others (at least for Python). It is so much more than a scripting language.
     
    MaverickMode likes this.
  40. steego

    steego

    Joined:
    Jul 15, 2010
    Posts:
    969
    So, you've probably been able to finish about 2 java programs by now? :p

    I do recommend looking into other programming languages from time to time though, even if not python, to expose yourself to different paradigms. It might help you think of new ways to solve problems in your preferred language as well. Think of it as deliberate practice.

    Lets do another analogy, just for fun. If java was the mother of a teenager, and was going away for the weekend, she would write detailed lists of what the teen was allowed to do and not, what to eat and when to go to bed, and she'd call every two hours just to make sure everything was ok. Python on the other hand would just say I trust you won't wreck anything, here are the keys to the car and there's beer in the fridge. Take care.

    Now, if you're an irresponsible teen, you might end up driving drunk, crashing the car and setting the house on fire, sure, but what's nice is that if you're a responsible teen, python won't get in your way and will let you do whatever you want, because it assumes you know what you're doing.
     
    MaverickMode likes this.
  41. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    I actually prefer ruby over python as a teaching tool. Python is a great language, but it's too easy to just keep writing python code like you write java/C#. With ruby you will be hard pressed to do that. Ruby is still very easy to learn, but it will force you to change how you think more so then python.

    Python has a philosophy of there should be just one way to solve a problem. Ruby is more like perl, there are multiple ways and at least 2 of them are actually good.

    Meta programming in ruby is generally more powerful and more elegant. Some stuff like DSL's are just downright painful in python.

    Real world project it's going to depend, either will work one will probably be better suited for your specific task. As a teaching tool though I still like ruby.
     
    MaverickMode likes this.
  42. Tomnnn

    Tomnnn

    Joined:
    May 23, 2013
    Posts:
    4,148
    Java was so verbose that I picked up everything after that in like a week. The only languages I haven't written a handful of programs in would be ruby and pearl. I'm not really writing any ruby but at work I'm starting to use gems.

    When I need to metaphorically burn my house down while driving drunk I think C will do just fine.

    I use livestreamer. I wonder how it would perform in another language.

    One of me, maybe.
     
    MaverickMode likes this.
  43. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,620
    I've got no idea as I've never used it. I certainly can't think of any reason that a visual language couldn't be used to teach the same fundamentals. Is that what PlayMaker is - a visual language?

    I agree that'll definitely get you going in the Unity side of things with making things happen, but I don't agree that it's equivalent to The Yellow Book when it comes to an introduction to programming for people new to the field. For starters, The Yellow Book talks quite a lot about the stuff that comes before and after the writing of code, and talks about the why quite a lot as well as the how.

    Programming is a skill. C# is a language. That skill and that language can both be used directly in Unity, as is. The presence of a visual editor, and some pre-exisitng framework and components doesn't change that (and are not unique to Unity). Where is this "repurposing"?
     
    Tomnnn and MaverickMode like this.
  44. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    It's a visual finite state machine, not a complete visual language. It can get messy if the best tool for the job you are doing is something not a FSM.

    To a man with only a hammer everything looks like a nail.
     
    MaverickMode and angrypenguin like this.
  45. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,620
    Ain't that the truth.

    Edit:
    Do you think this could potentially be why people have performance issues with it - not realizing the implications of what you've just said and trying to use it as a general visual scripting tool?
     
    MaverickMode likes this.
  46. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    That seems within the realm of possibility.

    I should clarify by saying I've never used playmaker. I did a lot if research into it when I discovered unity, and had decided to purchase it with the first $75 I earned from Unity. Personal circumstances were such at the time that I couldn't afford it out of pocket. However by the time the cash arrived I'd learned enough of C# and Unity to no longer need the tool.

    I've coded with other visual languages for work and uni. Visual languages are considered best practice in process control because a non programmer can quickly judge the state of the program. I wouldn't be keen to write an entire game in one of them.

    Compared with the visual languages I am familiar with playmaker has a lot of syntatic sugar. As with any syntatic sugar if you don't understand what's happening underneath it's easy to abuse and get poor performance. In the hands of an experienced coder I see no reason why playmaker would perform any worse then any other FSM implementation.
     
    Ony, angrypenguin and MaverickMode like this.
  47. aer0ace

    aer0ace

    Joined:
    May 11, 2012
    Posts:
    1,513
    After a long day out, reading this thread on my smartphone, I finally get to weigh in :D.

    C# also has the added advantage of making applications outside of Unity. Try that with UnityScript.

    @MaverickMode, you're an entrepreneur, and learning a general language like C# will open up worlds to development of application opportunities outside of games. Not only that, C# is “derived” from Java as already mentioned, and if you end up enjoying (e.g. really passionate about) C#, and you get more daring, you’d be set up to learn C++, since a large part of the syntax is similar, opening up even more opportunities.

    I couldn’t agree more with this statement. You’ve got to focus on the core concepts, and not immediately dive into the Unity application programming interface (API) and methodologies. Because doing the Unity stuff is just a google search away, and it’s very comparable to “digging into your box of Lego pieces to find just the right piece that fits.” Spending too much time on Unity-specific stuff before learning core concepts convolutes the learning process. It’s just crawling before walking before running.

    Regarding autocomplete, it’s great for beginners. However, I do use autocomplete, not to give me a selection of proper choices, but rather to save my fingers and wrists from repetitive stress. Anyone who's done this long enough will start feeling it and start questioning whether writing code is worth more than your general health. Hint: It’s not.

    I own Playmaker, but haven’t used it yet. As it was correctly determined that Playmaker is a visual FSM, I’m going to talk about visual scripting languages anyway ;):

    I am not a fan of visual scripting languages. The learning is not transferrable to any other language. It’s not guaranteed to have reliable text searches for variable names, etc. You can open up any text based source code with *surprise* a text editor. Any text editor. Visual scripts require a specific client to load. Not only that, it will require additional info in the source for at least position in a graph, thereby bloating the necessary file size for your VCS repo. And if the script file is stored in binary, good luck diffing between revisions in the final hour of your project. You can make an argument that visual scripts save as text that you can diff. But that just proves my point even further. The short of it, spend time learning a text programming language, not a visual scripting language.
     
    Last edited: Aug 16, 2015
  48. aer0ace

    aer0ace

    Joined:
    May 11, 2012
    Posts:
    1,513
    Oh, I forgot to talk about Python. Python's great. My last job on a AAA title, all of our gameplay code was written in Python. The predecessor to that game, they used C#/Mono. I'm not sure the exact reasons why they switched to Python, but I bet part of it was the bottleneck of tons of engineers having to register functions with the Monoscript interface. I personally only use Python for my build pipeline though. I do agree that reliance on whitespace is a little awkward for a text language, but that's such a minor argument for everything else that Python offers, that it's excusable. But again, Python is just another tool in your toolbox, and while it's not a choice to use for Unity, it's still invaluable for game/application development.
     
    MaverickMode and Ony like this.
  49. ChrisSch

    ChrisSch

    Joined:
    Feb 15, 2013
    Posts:
    763
    Just hit the learn section for an hour or so, and after each of the short tutorials compare the unityscript and C# code examples. You'll see the concept is the same, and the biggest difference is just a few declaration words and order of words. At least for us beginners. I was forcing unityscript because it looked a lot simpler at the time, and just like you I was scared of C#, but I was also getting sick of all the tutorials, examples, and assets I find to be in C#. Then I forced myself to "learn" C# and realized its pretty much the same because the concept is the same, just some different wording, but I ain't going back to unityscript. C# seems more strict and I need that as I'm still a beginner. I speak for us beginners, I'm no where near as skilled as our reputable community members Eric5h5 and hippocoder, who seem to have a difference of opinion on which is better. But I think it ultimately comes down to what you prefer, and like. Seriously, hit the learn section and compare the differences. :)
     
    MaverickMode, Kiwasi and aer0ace like this.
  50. Tiles

    Tiles

    Joined:
    Feb 5, 2010
    Posts:
    2,481
    You grab Unity to make a game, not a calculator. So when you look at it from the angle of how much stuff you can do outside of Unity, then you did the part with the planning wrong already. The interesting part is how much stuff you can do inside of Unity. And which language suits your needs best here.

    When you just want to create a calculator then there are more ways than just C#. And then you don't grab Unity at all. When you want to make a OpenGL game then C# is of no help. That's Javascript. When you want to make a flash game then again C# is of no help. That's Actionscript. Godot uses a Python dialect. And in Unreal you use C++. C# helps you exactly nothing in all those cases. And you will very likely NOT use C# in your next engine. Languages changes. It's the tool that is of interest.

    It's all about what you want to achieve. Not about using a language as an end in itself. The goal defines what tool you use. And the tool defines what language is available. In Unity you have C# and Unity JS available. And they both do the job equal fine. It still comes down to personal preferences. The only thing with Unity JS is that the C# fans have meanwhile ruined every JS support at this board and does everything to let C# "succeed". Not seeing that you simply loose big parts of the JS fraction instead of convincing it. And even administrators are part of this problem, instead of solving it. As you can see in this thread again.

    There were times where it was a with each other, no matter what language you used. It's sad that this is long gone. Which is one of the reasons why i moved on for now. You are not longer welcome here as a Unity JS user. And i cannot be bothered to switch to C#. That's for me a downgrade in easiness and development speed.

    By the way, surprisingly the language of my next tool is NOT C#. How unexpected ... ;)
     
    MaverickMode likes this.