Scripting (460234)

I can see disagreeing, but “horrid”… interesting.

It guess it depends on what the OP’s goals are. If you just want to bang something out with limited understanding of what you’re doing, I guess any language would suffice. Hell, I taught my son using Logo/Turtle. Of course he was 5 at the time.

Most Unity development is done in C# or JavaScript (or a combination of both). Both are C derivatives in structure and syntax.

I would have to agree with starting with a lower level language. You may get discouraged, but if you are persistent it will help you in understanding what is actually going on when you type out code. There are a lot of help asked on here that stems from a complete misunderstanding of what it is you are actually coding.

Starting lower level and moving up allows you to actually see and understand what it is the higher level languages are going to be doing for you, and will allow you to better understand your code and solve more intricate and difficult bugs/optimizations. Starting high level and moving downward will require a redefinition and gross expansion of what it is the code you are writing actually does and how it interacts with the whole.

Though if you aren’t perseverant and get easily discouraged then starting with a lower level language is could be very difficult without a proper instructor

Why start at C++?

Are you not man enough for assembly/bytecode? Surely then you will understand best how C# and Unity works.

Hint: No you wont, you’ll just waste your time if your end-goal is to make a game in Unity. Just like you will waste time learning about C++ pointers.

Start as low as you plan on working with.
Knowing C, or C++, it makes C# easier and more clear. Knowing C# and trying to learn C or C++ is a major pain and requires a sort of rewiring of core concepts.

Granted, I didn’t read the entire thread and took the above comments as a general ‘learn programming’ rather than ‘learn C# for Unity’. Learning Python or Ruby is equally unnecessary(but not a bad thing to know overall) if all you care about is C#/Unity.

Why the hostility?

The closer you get to the machine the better you will understand what any language is doing for you. So sure, knowing Assembly is actually very helpful, but in practical terms I feel a decent level of mastery in any of the early 3rd gen C type languages will give a programmer a sufficient leg up when using some of the later languages. Using your example, an understanding of pointers gives a great deal of insight into how memory is referenced, dereferenced, etc. to take it down to the level of GPRs is not necessary to that understanding, but good to know.

You can fairly argue that you don’t need to know any of this since it is handled for you and I would agree that in many cases, maybe most, this would be true. But to claim that this has no value is silly. What is happening when you declare a variable? What is the significance of the ‘byVal’, ‘byRef’ keywords? What is going on when I use an “out” parm? Why are my 3000 string concats causing my game to lag?

Forgive the simplicity of the illustration, but I don’t have time to spell it out in as much detail as I’d like to.

In any event, I agree with what others have stated moving up from a lower level is much easier then moving down. I also know from experience it results in cleaner and more economical code. It’s all a matter of what you want to accomplish.

To summarize regarding the Op question, if your goal is to design game and you choose unity to do so, focus on unityScript or C#, you do not need to dive into any other language really…until you start to feel the need to incorporate your own plugin in unity eventually.

Then if your goal is beyond the simple use of unity, go learn whatever you want hehe, so yes C, C++ are usually the beast you want master…but I would add to that OpenGL or directX…and some serious maths behinds…then the underworld of game engine will open the door for you…and as a good geek you will drop game making and start doing your own engine hehehe…which for the experience it can give you is not a bad thing, but this are for me 2 different worl and vocation…

To back on unity, as C# is not specific to unity, you may prefer learn it, for a beginner it can already be quite challenging language when you want go deeper with it.

But as far as i know, this is not much the language that will take you time to learn…but whatever api you are using with it…
You can grab objC fairly quick…but remember or get to know what to look for inside the 3000 functionnalities of iOS5 is time consumming…

The question is, do you want to learn programming with Unity?
Then it boils down to Unity’s three languages where in my opinion C# is currently the most preferable. But lets take a closer look:

C#:
++Tons of documentation, trainings and books available which is extremly important for a beginner
++Widely used in industry and steadily increasing: http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html
++Free Visual Express edition available (can be used as editor or just if you want to try something outside of Unity)
–Less Unity examples than UnityScript

Unity Script:
++Lots of resources and examples with Unity
++Less typing and clearer code than C#
++C-like syntax (easier switch between languages)
–It is actually a bit different to JavaScript, which could be a serious problem for a beginner as no dedicated documentation exists

Boo:
++Own dedicated homepage with documentation
–Not relevant in industry
–Barely used in Unity community

If its about learning programming in general you could take a closer look at some of the many BASIC based languages like BlitzMax or PureBasic. I like the BASIC syntax far better than all this c-syntax-based stuff…

Okay, maybe not horrid. After all, he can’t go wrong with learning any language (maybe he can with Assembly or VB, but that’s a different discussion altogether).

What I was trying to say was, Yes, he would be better off if he knew C++. Obviously anyone would be better off. The question is, would that be the best use of his time, especially as a beginner.

Right now, he needs to learn programming concepts, like classes, inheritance, polymorphism, methods etc, not get boggled down in syntax hell.

My view of things is that you’re better of learning from the top down, i.e., learning the concepts first, and then get more to the down and gritty stuff (if you need it). And you don’t need to know C++ in order to know what pass by reference and pass by value is :wink: Next someone will come in here and say you need to learn DX or OpenGL in order to understand Unity better. Sure, you would be a better programmer if you learned DX, but it would definitely not be the best use of your time if you’re not going to be using it frequently. It’s all about finding the solution that gives you the most bang for your time, and I don’t think C++ is one.

Again, my view of things is you should never invest huge portions of your time in any one thing, unless you’re really going to be needing it. And, tell me again, where will he be using C++? And I’m not talking only about Unity here, I’m talking in general. Unless he’s some sort of a masochist, there is no reason for him to be using C++ if he’s not developing for the mobile platforms, and even then, he’d need to learn Obj-C, not C++. It’s similar, yes, but it’s not the same. So why would he be learning C++ when he can just start learning Obj-C? It’s like saying it’s better to learn Chinese first if you’re trying to learn Japanese. It would be better, yes, but it’s not the best use of one’s time.

This is where the high level languages come very handy. You’re focusing on the structure of the program, not the syntax. You learn to think of programs as classes and methods, not as vectors and variables.

And saying having learnt C++ first results in cleaner code is just plain wrong, no two ways about that.

P.S. Didn’t intend to sound mean, I’m just tired of people preaching C++ like it’s the god of all things programming. I especially see this from older programmers who have been raised on pointers and references :stuck_out_tongue: