In the modern high level languages, the machine level details are hidden from the user, so in order to work with CPU cache, memory, network adapters, learning C programming is a must.
C is a general-purpose programming language and can efficiently work on enterprise applications, games, graphics, and applications requiring calculations, etc. C language has a rich library which provides a number of built-in functions. It also offers dynamic memory allocation.
There is no need to learn C before learning C++. They are different languages. It is a common misconception that C++ is in some way dependent on C and not a fully specified language on its own. Just because C++ shares a lot of the same syntax and a lot of the same semantics, does not mean you need to learn C first.
Programming in C forces you to learn memory allocation, data structures and types, how a computer treats and stores different kinds of data, and finally how to manage memory. These are things that you won't get to if you learn only a high-level language.
C++, for two reasons.
1) a lot of games are programmed in C++. No mainstream game is, as yet, programmed in a managed language.
2) C++ is as hard as it gets. You have to master manual memory management and generally no bounds checking (beyond the excellent Valgrind!). If you master C++, you will find this transferable to managed procedural languages. Less so the other way around.
C++ has a level of complexity close to APL! You'll never get better by playing weaker opponents.
Joel makes a very strong point about this. People who understand how the machine works make better programmers, because all abstractions are leaky.
Ok here is my two cents.
If you are planning to seriously get into the game industry I recommend you learn both languages. Starting off with C++ then moving into a managed language like C#. C++ has it's advantages over C#, but C# also has advantages over C++.
Personally I prefer C# over C++ any day. This is because many reasons:, just a few:
Now...there are many things that I miss about C++. I miss being able to (completely) manage my own memory. I can't tell you how many times I caught myself trying to 'delete' an instance/reference. Another thing I dislike about C# is the inability to use multiple-inheritance, but then again it has forced me to think more about how to structure my code.
There has been more discussions on this topic than there are stars in the known universe and they all close at a dead end. Neither language is better than the other and refusing either one for the other will just hurt you in the long run. Times change and so do the standards for computer programming.
Whatever language you choose to keep at the top of your list, always keep your options open and don't set your mind to any one single language. You say you already know C++, why not learn C#, it can't hurt and I 'promise' you, it will make you a better C++ programmer.
It depends
It depends on a lot of things - your goals, your experience, your timeframe, etc.
The majority of game programming isn't language specific. 3D math is 3D math in C# as much as it is in C++. While the APIs may be different, and different 'bookkeeping' may be required, the fundamental logic and math will remain the same.
And it's true that most AAA game engines are C++ with a scripting language on top of them. That is undeniable. However, most AAA engines also have a bunch of in-house tools supporting them, and those may be in anything - Java, C#, C++, etc.
If you want to write a game, and are an experienced developer then C++ and C# have a lot going for them. C# has less housekeeping, while C++ has more available libraries and tools. For anything highly complex, however, you'd be best off trying to use an existing engine as a starting point.
If you want to write a game, and are a new developer then don't write an engine. Use an existing engine, and mod it or use its facilities to write your game. Trust me.
If you want to learn how to write an engine, and are an experienced developer you should probably think about C++. C# is possible as well, but the amount of code and ease of integration of C++ probably puts it over the top.
If you want to learn how to write an engine, and are a new developer I'd probably recommend C#/XNA. You'll get to the game 'stuff' faster, with less headache of learning the ins and outs of C++.
If you want a job in the industry then you need to figure out what kind of job you want. A high-level language can help get a foot in the door dealing with tools and/or web development, which can lead to opportunities on actual game work. Even knowledge of scripting languages can help if you want to go for more of the game designer/scripter position. Chances are that you will not get a job working on core engine stuff immediately, as the skills required to do so are pretty high. Strong C++ development skills are always helpful, especially in real-time or networked scenarios.
AAA game engine development involves some serious brain-twisting code.
If you want to start a professional development house then you probably aren't reading this, but already know that C++ is probably the only viable answer.
If you want to do casual game development then you should probably consider Flash or a similar technology.
I'm not going to answer the original question since most post here have. I'm going to point something out to you that you missed in your post. Simply knowing C\C++\C# isn't going to get you a career in game development. Most game studios get dozens to hundreds of applications for a simple code monkey job. What makes you stand out compared to them? What makes you a better hire than someone else who has experience making games at another studio?
If you really want a career in the games industry, even on consoles, you should make a demo of some kind that shows what you know. C++ would be great language choice to use in the demo if you're applying for a console development position. You could show off more by making a tool in C#\XNA to create the assets for your demo. You'll show the hiring managers and tech leads that you're not JUST a C++ guy or JUST a C# guy: you're a developer.
There is no one language that is a "better bet." Use the language most appropriate for what you need to do, whether it is game programming or any other domain. C++ isn't going away anytime soon.
If you're not developing for a Microsoft platform, I doubt you'll use C#.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With