Advertisement

Need help choosing a language

Started by April 03, 2015 05:24 AM
29 comments, last by jacmoe 9 years, 9 months ago

It gets to a point where the programmer needs no knowledge at all with that sort of stuff.

Do you realy wanto be unknowing ?

S T O P C R I M E !

Visual Pro 2005 C++ DX9 Cubase VST 3.70 Working on : LevelContainer class & LevelEditor

It gets to a point where the programmer needs no knowledge at all with that sort of stuff.

Do you realy wanto be unknowing ?

This is not useful or relevant to the discussion at hand.
Stop.
Advertisement
I've been interested in learning how to create games but I'm not sure which program is best. Some say Unity is best but some say C# is too difficult to learn and C++ is the way to go. I've touched on Python earlier this year and it was easy to grasp but I heard you can't do much there. I heard too that for Android App making it would be Java, and I wish to do that too but probably after I learn C++/C#/Python or whichever is best.

Pick one of those. I'd recommend against C++, personally, as it is a language steeped in a culture of "expecting you to know what you're doing already," which makes it a poor first choice. I'd further suggest that you continue with whatever language you've already started learning and already know the most of. It sounds like that's Python. What you "heard" about not being able "to do much" with Python is almost certainly wrong, and whatever small bits of truth might lie buried in that generalization aren't applicable to you because, as a beginner, the limiting factor on your ability to "do much" is you, not the language.

At this point your primary aim is to learn programming fundamentals, and as long as you're selecting a language that will let you do that and not get in your way too much, you'll be fine, and you'll have a much easier time learning other languages later on (should you decide to) once you've gotten a basic handle on those concepts.

The other important thing is to actually practice making things with the language -- beyond just the assignments from your course, if you're still taking it. Make little games on the side in your spare time, starting with simple text-based things like "guess the number" or Hangman or Blackjack and moving on to more complex things like a text-based adventure game and finally to things like windowing and graphics.

I wouldn't get too hung up on which language you start out with. You'll eventually end up learning multiple languages and a lot of the basic programming concepts you learn in one will apply to others.

If you do want a good language to start with, I'd probably go with C#. I'm in the process of learning it myself and it's a relatively straight-forward language to learn. The nice thing about it is you don't have to worry about as many things as you would with C++ (i.e. memory management).

You'll also be better poised to use things like MonoGame or Unity in developing actual games.

The single most important thing to do is to start programming -- in any language. Making the 'right' language choice in the beginning seems like a big deal now, but its literally one of the most inconsequential choices you will ever make as a budding programmer. Syntax is easy, its the programming that's hard. Programming is not mindlessly typing C++, or Java, or assembler code -- programming is taking a big problem and splitting it apart to its atoms, then creating the best machine you can imagine to put it back together again while balancing performance, elegance, maintainability, and more -- and working with others to build that machinery on time.

Now, all that said, you can make choices that are better or poorer, and the poorer ones are to be avoided. Cobal or Perl are probably bad choices because they lack applicability in games. C++ is terribly complex -- its gotten a lot better with the newest language revisions (C++11/14, and soon, 17) but its still complicated enough that its probably not a great first language unless you have someone to guide and mentor you; on the other hand, C++ is the lingua franca of the games industry and indeed most of computing -- there's a pretty high return on knowing C++ when you do take the time to learn it correctly, but it might be premature as a first language. Java, in my opinion, is a poor choice because it forces you to use the dogmatic version of OOP they prescribe because its built into the language rules, and much of which flies in the face of what we understand to be better OOP practices now -- C# suffers some of that as well, but the dogmatism is less prevalent and it gives you more options and conveniences for making it a more 'livable' language. Some people would disagree with me, but my take is that C# is an objectively better language than Java. But successful, popular games have been made it both languages.

If I were pinned to making a recommendation, it would be C#. Or possibly plain old C. Either of those are relatively proven and are industry-standard. If I venture away from mainstay languages, I've been looking at a language called Nim lately (formerly called Nimrod) which I suspect would make a great first language because it has a very friendly Python-like syntax, a very nice macro/template system for you to grow into, and it integrates both a garbage-collected heap (like C# or Java) and a manual heap (like C or C++), and you can choose to use one, the other, or both in your programs.

throw table_exception("(? ???)? ? ???");

C++ will give you more knowledge of what goes on 'under the hood' than learning some other languages here first. Lots of people will argue dealing with things such as memory management early on is a bad thing. I think it's the total opposite. Even if later on you end up using a language that is higher level, you will still have learnt important lessons from doing the lower level stuff that will make you a better programmer.

Advertisement

First of, I want to say thank you for all your replies. It were all insightful. I'm leaning towards C# as of now then slowly moving to C++. Then seeing what more I can do with Python as there are also game engines that run through Python. I really appreciate all the responses, and I hope C# doesn't kill me. Hahaha.

I actually used Turbo C in one of my Computer Classes back in first year I think. But I realized after looking at C++ code that I learned plain C then haha, hopefully they're somewhat related so that I wouldn't have such a culture shock.

I'm still torn between going the harder path of C++ or going C# and gradually moving to C++ though.

that will make you a better programmer.

That assumes that the OP is a programmer already.

At this stage, language is totally irrelevant. What is important,though, is that whatever language is chosen, that it will function as a vehicle to actually get some programming done.

What got me started doing real programming was Delphi (Object Pascal) - it made me highly productive and with it I created my first, non-trivial program. I totally couldn't care less about what went on under the hood! :)

Too many projects; too much time

First of, I want to say thank you for all your replies. It were all insightful. I'm leaning towards C# as of now then slowly moving to C++. Then seeing what more I can do with Python as there are also game engines that run through Python. I really appreciate all the responses, and I hope C# doesn't kill me. Hahaha.

I actually used Turbo C in one of my Computer Classes back in first year I think. But I realized after looking at C++ code that I learned plain C then haha, hopefully they're somewhat related so that I wouldn't have such a culture shock.

I'm still torn between going the harder path of C++ or going C# and gradually moving to C++ though.

I have a follow up question to myself however, what's the difference between C# and C++?


I have a follow up question to myself however, what's the difference between C# and C++?

Shrak asked me to weigh in on this question through PM -- posting my response here so everyone can consider it.

There are probably lots of good discussions you can search for here on Gamedev and elsewhere. If you reply to your thread that you have likely narrowed it down to these two and want to know more about the differences (basically ask this same question, only in the thread) I or others might go into more details there as well.

Briefly, though, there are a couple big differences.

The first is that C++ treats the programmer as being entirely competent and skilled. C++ will mostly never tell you that something you're about to do is a bad idea, and when it does the compiler will always concede if you type a few more characters to convince it that you really do mean what you're saying. It also leaves all the responsibility of cleaning up after yourself to you. C# treats programmers as fallible people, and takes on a greater role as referree and housekeeper -- it will clean up after you, it'll tell you about your bad ideas frequently, and in some cases it will refuse to do things no matter how you try to insist. For a beginner, C++ is sometimes too unhelpful (also in part because error messages are sometimes cryptic) so C# can be a better choice -- on the other side of the coin, C# can be somewhat limiting for the expert who knows what she's doing.

The second is that C++ is a systems language. This means you can use C++ in high-level applications all the way down to bare-metal (say, in an operating system), the creator of C++ describes it as a systems language for building powerful, efficient abstractions (e.g. in libraries) and then applications on top of those. C# is an applications language, there have been experiments in writing things like operating systems (mostly) in C# with only a minimum of C or C++ underneath, but its really build for applications -- specifically, for applications that can give up some performance (say 10 or 20 percent average, perhaps 50% with expert-tuned, computationally intensive C++) for higher programmer productivity (say 2x or more). C# is deliberately easier to use than C++ for a good variety of applications. This is a worthwhile trade-off most of the time, unless you're the 5% of people that really need every drop of performance -- and contrary to popular (historically true, but no more) belief, most games don't fall into that category -- not even most AAA games, let alone small-team indie games.

Then there are platform and ecosystem differences. One of the things that complicates C++ for new programmers is the way that C++ code modules are split between header and source files -- which can be confusing, and can create circular dependencies if you're not careful. C# code modules exist in a single .cs file and you have to think less carefully about build-order dependencies. Another difference is that C++ has only a small standard library, while C# has a very large standard library -- if you want to parse XML in C++ you need to go find the 6 or so popular options and then decide which of them appeals to you the most; in C#, you can find XML parsing right in the standard library -- this extends to all kinds of useful things like SQL databases, networking, encryption, compression. C++ has (usually many) options for each of these too, but you need to go out and find which one is best for you, and also think about how well or poorly its going to work with the other libraries you might have chosen (in C# the standard libraries all work pretty well together and you don't have to think much about it).

throw table_exception("(? ???)? ? ???");

This topic is closed to new replies.

Advertisement