I have just started to use Unity3d and have really taken a liking to it so before I delve too deep to turn back I was wondering what programming language is best. Obviously they all have advantages and disadvantages etc but a book I am following is using Javascript but it seems like starting to learn c++ or c# would be more beneficial if I was to expand to other game developing programs. The latter seem to be more useful and I would be better off working with them rather then Javascript.
I donât know that either C# or JavaScript is going to be any easier than the other to learn as a beginner⌠but as others have said, C# will make your life easier down the road.
Unityscript IS NOT Javascript. Pointless to learn that if you ever plan to do anything outside Unity. Learning C# will give you a much better foundation to work in just about any industry that needs a skilled programmer, not just game development. Once you learn C# for Unity, Unityscript is pretty easy to pick up, at least to the point where you can edit scripts which is good enough if you are using C# as your primary language.
I donât know if itâs pointless to learn as so much of the formatting and framework is the same as javascript. I donât think anything is pointless to learn, actually.
the whole UnityScript/Javascript thing would be best clarified if unity were to replace the nomenclature they use throughout their entire documentation site⌠Unity - Scripting API:
Thatâs not likely to happen though, so Iâm sure whenever someone uses the term âjavascriptâ we can all just nod our heads and understand what theyâre talking about. Consistency may be better than accuracy in some cases.
But personally, I would say that if youâre able to learn C# then you can pick up javascript pretty easily⌠and⌠if you are able to learn javascript you can pick up C# pretty easily. Hell if you can learn to program in one language you can learn to program in another language. All it comes down to is who do you want to spend your days with and âpick your poisonâ.
for me at first it was UnityScriptâŚi been playing with Unity since 4.3,Just recently I switched to C#âŚto me its like a backward UnityScript, you know instead of var Player : GameObject; âŚits public GameObject Player;âŚI learned by converting all my UnityScripts to C#âŚsome other things are differentâŚthe best way is to look at the samples in the scripting guide and switch between the JS and C#
Actually, it is, to the point Iâd say itâs borderline deceptive to call call UnityScript âJavaScriptâ at all.
UnityScript is a classical, strongly-typed language that uses .NET as its foundation, and has only been around as Unity has. Itâs actually far closer to Googleâs Dart language, than it is to Java/ECMAScript.
class Foo {
var a : int = 5;
function Bar() {
return a + a;
}
}
var Baz : Foo = new Foo();
Debug.Log(Baz.Bar());
Conversely, what we call âJavaScriptâ is also known as ECMAScript, and is a prototypically-based, functional language. ECMA/Java-script has been a major web scripting language for over a decade. The two really are as different as can get, some similarities in syntax aside.
var Foo = function() {
var a = 5;
var pub = {};
pub.Bar = function () {
return a + a;
}
return pub;
};
var baz = new Foo();
console.log(baz.Bar());
EDIT: No, Unity Forums, neither of these examples are C#! Stop lying.
Look, Iâm going to give the answer you donât want to hear, but it is the truth whether you can handle it or not.
The truth is that whether you learn C# or Javascript (or Unityscript if you are so inclined), at the end of the day, if you are serious about game development and want to hone your skills to the best of your abilities, it doesnât matter what language you learn.
It does not matter what language you learn. Say it with me. Ready? 3,2,1⌠It Doesnât Matter What You Learn.
Because at the end of the day the actual skill that you are learning is programming.
While the following isnât the most accurate analogy⌠Think of it like learning how to drive a wheeled vehicle. If you learn how to drive a sedan, and properly learn it, you can easily learn how to drive a minivan. You can easily adapt to a truck, and any other wheeled vehicle you can think of.
The truth is, if you are serious about this, in some time you will reach a point where you will be able to read code (and learn to write in a short amount of time) in virtually any language and be just fine.
So please, just choose one that you like and go with that, but learn it PROPERLY. Do NOT take shortcuts and just copy paste code that you think will work. If you donât understand how something works, Look it up! I know itâs more fun to just make stuff happen, but trust me - that gets old real quick and youâll hit a roadblock eventually where you can no longer move forward - because you wonât have the basics down, you wonât have the principles to move further than just making cool stuff happen. You wonât learn how to write a real game, if you donât learn it properly.
Donât learn a language. Donât learn how to make random things happen by pasting code. Learn Programming. Do it
But seriously speaking - Maths, calculus, etc, DO NOT BE AFRAID of them even if you HATE Maths or are TERRIBLE at it. I failed Maths a lot at University (College if you are American?), and yet I found my performance or dislike of Maths to be completely irrelevant to how I feel about having to learn what little I needed to know for game development.
tl;dr: Thereâs really not a whole lot of Maths you have to know, and most of it is easily learnable. Learning to program effectively is much more important (and a slightly more difficult task ;))
Haha, but things will be much easier for the OP if he knows say trigonometry when working with a 3d engine that uses trig massively in functions and stuff. Itâs a question of whether someone who knows trig will spend far less time fretting over vector3 manipulations than if the OP just goes blind and learns how to write a function.
Lol u guys donât know anything about code. Try Boo. Fastest and easiest language. Also, the majority of the code used by unity is Boo. On top of that, the name is coo(l). So yea⌠BooâŚ
Lol bro plz. Boo. Its cool. Faster than checking a bool. While sitting on a stool. Wearing all wool. And relaxing by the pool. Better than going to school. And not being a fool. Because you know how to use a tool like boo.
No bro you listen to me.
C# is the way to be.
You donât need to know how to play the harp,
You donât need to catch a big ass mighty shark
To learn the awesome ways of C SHARP
You donât have to break you head
You donât have to jump on your bed
Debugging is a breeze, donât use boo lest your heart will cease.