In an earlier topic I posted, I asked about what kind of coding experience do I need to effectively build games with Unity. C++? Java? Javascript? I’m trying to get absolute clarification on this because I have an opportunity to take several tutorials through my school on one of these languages and I want to make sure I learn a language that will help me utilize Unity the best. I’ve read that Javascript is the easiest to learn of these…is that true? Anyway, any help and knowledge will be greatly appreciated. Obviously, I’d love to just hit the ground running but I also want to establish a baseline of knowledge so I can build better and better games over time without having to relearn something because I learned the wrong language in the first place.
When working in Unity you have your choice:
- JavaScript
- C#
- Boo (a dialect of Python)
(notice: neither Java nor C++ are listed!)
Most folks use either JavaScript or C#. Both are rather widespread in the usage even outside of Unity, but I guess I tend to say that JavaScript is the more widespread of the two and yes, it tends to be easy to learn. But at that rate I’m finding C# easy to learn but that’s after having a few scripting languages under my belt already.
Javascript or C#.
But honestly, once you learn to program proficiently the differences between most modern languages are just a matter of learn a few syntax differences. So concentrate on learning to program (in general) and then using Unity will be easy to learn (regardless of the language you use).
The three languages Unity uses are Javascript, C#, and Boo. However, any programming experience is good. Knowing the basics of how to program is far more important than the specific language.
Not sure, but in my opinion, it’s the easiest to work with in Unity. Keep in mind that Javascript as it’s used for the web is somewhat different than the Javascript in Unity. Since most of the programming learning curve in Unity is learning the Unity commands, which are mostly the same for all 3 languages, I wouldn’t get hung up on any particular language.
Edit: OK, apparently we all replied at pretty much the same time, but at least the message is consistent. ![]()
–Eric
i’d vote for javascript. i had no programming experience when i started - javascript is simple enough that you can usually infer what is going on even if you’re not exactly sure what you’re looking at. IMO that can help alot when you’re new to both programming unity’s classes. C# is a bit more obtuse i guess i’d say, though now that i’m more familiar with how things work (relatively ; ) i can usually figure out what’s going on in them too by seeing what unity classes are being used.
there will always be little gotchas though - you’ll think something wants to be sent a transform when it really needs a rigidbody, quaternion euler angles etc, but when you get stuck the error log, docs forums will be here to help.
so if you want to get up to speed quickly, IMO javascript. i do know of people who program that prefer C# though, and i’ve read it can be better suited for certain tasks (like manager classes).
Javascript is definitely easier. I prefer C# because of my C++ background. It just feels like I’m able to encapsulate and preserver my OO designs with C# more so than JS (partly because I don’t know how classes work with Unity’s JS :/)
thanks yall, that really is helpful advice. I’m going to take an extensive online tutorial regarding Javascript, mostly because it’s suppose to be comprehensive and it’s free to all students at the University of Florida, where I’m a grad student. Plus I’m going to mess around with the Unity trial and see how things work out. Thanks again.
'foot
If you use the pro version of Unity you can also write plugins in C++.
With my experience, it’s good to know how to program and resolve problems with the tools you have, so learning Javascript or C# is just a matter of reading a book with the correct syntax.
To do good in Unity you need to learn the behavior of the components of Unity, it doesn’t matter the language you use, because the algorithms will be the same almost all the time.
Well, I think Javascript is more used in Unity because it’s easy, but C# let’s you use more advanced tools like create plugins or use Mono classes. I don’t know really.
Learn to program, not the language, but i recommend Javascript since it’s learning curve is faster, and then you can switch to C# (or any other) in no time.
.ORG
I’d jump in with Javascript too. I agree with drJones in that C# seems just a bit more “programmy” and obtuse for me to wrap my head around. And as Omar said, learn to program well and comment your code, then jump into whatever extra languages you’d like to learn.
But if I was young, smart and talented like Jedd (bronxbomber92) or Yoggy (Forest) who are both 15(!) for freakin’ sakes, I’d probably jump into C# big time to learn it as well.
id go with javascript, in my opinion its easier, my first programming language was C++ but i never would up buy C4 which is why i was learning it, and javascript is way more strait forward than C++
do you have unity yet by the way??
i wish i was that level headed when i first started…
How about Boo? I have about four years experience with Python, so Boo’s pretty tempting to my Python-loving, C-syntax-hating self.
I’m curious why it seems to get no love though. Is it unstable? Slow? Does it interoperate with C# and/or Javascript scripts?
It’s been my experience that Python’s one of the best languages to start with, and I’d assume Boo would be as well.
-Dane
I can’t answer if it’s slower etc (I doubt it) but I think the answer to your question is how recent a development Python is compared to Javascript. Plus, to jump into Unity via Boo or C# means you’re already a programmer … Javascript is used in some form or another all over the web and it’s a language I’d have guessed more people (i.e., non-programmers like myself) have had much more contact with in the past.
There are two reasons why we say javascript is the preferred language:
- Most people know javascript
- Code examples are in javascript
If JS/Boo/C# is easier or not is a subjective matter. And mostly depends on your background. Everyone will feel different about it.
There is nothing that makes JavaScript a much better language to use in Unity than Boo or C#. They all work, and they all have the same API and they can all interoperate with each other.
If you really like python and really hate JavaScript. By all means, use Boo.
If you are undecided, use JavaScript.