Will it be C++ the preferred game dev language in 3 years from now?

Started by
54 comments, last by Satharis 10 years, 5 months ago

It already isn't the language it used to be.

By volume the current top development platforms are iOS and Android. The language you will likely use for either are Objective C and Java, respectively.


This, of course, depends on WHERE you are working.

Our iOS guys jump into a common C++ code base and our Android guys get into C++ land as quick as they can; both touch the other languages only for the bits they have to the rest remains C++ as before.
Advertisement

C++ is said as decaying for long long years (I heard it the first time around 10 years ago), but it still hasn't lost its strength. If you want to target the big gaming platforms, C++ is the way to go.

I would certainly tell anyone that wants to get employed in game development to learn C++; as well to those who want to get into PS4 and Xbox One indie wagon.

It's powerful and cross-platform. From the languages I use, it is no doubt the one I deem as the best choice for most of my projects.

Still, I would also advise them to learn Java, javascript and possibly a scripting language such as Lua. If the processors start to evolve in a really fast way (faster than now) scripting languages can even turn into the most used technology. But that won't happen in 3 years; I bet.

It is a common problem: people consider that using C++ will make your design side worse due to the time you spend on programming. Well, I don't agree with this. I think I can make the same game with C++ I could do with Lua, maybe not on the same time-stamp, but, given the "fun and simple" design concept behind this belief, it usually doesn't take that longer.

Disclaimer:

You've reached a sensitive topic. Most things people say on "language wars" are personal opinions, sometimes unfounded; my commentary included. Of course we do genuinely believe what we're saying, but you have to filter what to believe. For instance, I've plans of programming for mobile at some point, but have never done it. On the contrary, the author of your linked site clearly likes mobile development... and probably got frustrated on trying to learn and use C++ at some point.

Processors becoming fast enough to make scripting languages viable in more general-purpose terms has been around for a while, but I don't believe it's ever going to happen; this is a case of Parkinson's Law: "Work expands so as to fill the time available for its completion".

We've seen this with storage, with network capacity, and I feel that I can quite safely predict we'll see it with processor performance too. No, I can't predict what kind of work will expand, but I've little doubt that some kind will.

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.

C++ 4 LIFE!!!!

(sorry, I've been drinking)

people consider that using C++ will make your design side worse due to the time you spend on programming

I don't think that's quite the argument that is typically being made. To a good engineer C++/Java/C# are all pretty much equivalent, and the time taken to accomplish a given task will vary mostly with the available APIs (an area where C++ has an edge when it comes to game development - less so in other fields).

The problem is with inexperience - C++ comes attached to significantly more complexity than it's newer bretheren, and until you are extremely familiar with both the language and the engineering practices it makes necessary, your productivity is unlikely to be as high as a similarly experienced Java programmer.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

I'll go a bit further with that.

If you only learn one language, you will generally tend to think in the mindset of that language, and have difficulty following to other languages.

Some examples are in order from recent posts on the forum. People who only know C++ tend to think of object life cycles in terms of constructor and destructor, and have difficulty in situations where lifetimes are more complex or where destructors may not exist or are not guaranteed to be called during the program's lifetime. People who only know Java tend to rely heavily on exceptions, and pass-by-reference is a foreign concept, both were some interesting forum topics. People who only know C# tend to not realize the costs involved at a lower level, and take features like primitive boxing for granted.

I read a really good example of this some years back. A group was looking for a tools developer, and their required skills included being able to develop in multiple languages in addition to basic shell scripting. As part of their coding sample they asked the applicant to write some code to be run from the command line, accept a bunch of integers in std in, sort them, and write them back out to std out. Most examples were 10-30 lines of C, C++, perl, python, and other languages. Only one person wrote a simple shell script, "/usr/bin/sort -n".

If you are limited to only one language you will think only in terms that fit that language naturally. If you know many languages, you can think in terms of other languages. There have been hundreds of time I have been writing code in language /x/ and thought to myself, if only I had this feature from language /y/. Sometimes it has been faster and more efficient just to link against a utility library that calls code from another language, just like the example above where the person reused existing functionality from somewhere else, because they could.

Don't get trapped in the single language rut. At a minimum, learn C++, Java, C#, JavaScript, Python, and Perl. Each one will teach you different ways to think about problems. Learn more languages as you have the time and inclination, hopefully pick up a functional language or two as they will teach you a great deal if your life has been limited to imperative languages.

Knowing a language is like having a tool available to you. When you only have a hammer your skills are limited. When you have 5 different kinds of hammers, many types of saws, a collection of drill bits, grinding tools, welding tools, etc., you will be amazingly productive compared to the guy whose only knowledge is how to use a claws hammer. Just because many game engines are written in C++ does not mean that is the only language to learn. No matter what primary language you will use in your day job, simply being aware of many languages will improve your skills and abilities no matter what language you are using at the moment.

I don't think C++ is going anywhere any time soon. There is no practical replacement for it. Also the C++ committee has recently become very active; C++11 was a large improvement, making C++ feel almost modern, and C++14/17 will be out soon enough.

Which language you should learn for game development depends entirely on what type of games you wish to make. If you don't mind being stuck in Unity land, C# it is.

You say you want to "become serious in game dev". Serious to me means knowing C++.

Languages like C#/Java/Javascript/Python are fairly brain dead and don't require much effort to learn, so learning them once you know C++ isn't difficult.

Alternatively Languages like Haskell/Lisp are a tad bit more interesting, and I think an understanding of functional programming will get you farther than just tacking on junk language X.

I'm a little confused why people would assume C++ would ever go anywhere unless some language takes hold that does what C++ does, but better.

Frankly, although I'm a huge advocate of languages like C# and they're -always- more fun to work with, the fact is that for fast, no hands holding code C++ doesn't have much competition. Realistically most companies have used C++ for a long time, they have code for it, their programmers are trained in it, and for gameplay scripting or anything of the sort that doesn't cause catastrophe if it loses any speed, C++ is already being defeated.

No real way around the fact it's here to stay unless something better comes along, even if computers get more powerful, AAA companies always strive to be like Hollywood, bigger and badder, so that kind of requires sticking with C++ for the time being.

No real way around the fact it's here to stay unless something better comes along, even if computers get more powerful, AAA companies always strive to be like Hollywood, bigger and badder, so that kind of requires sticking with C++ for the time being.

With so much being offloaded to the GPU and if physics cards ever take off, and with the CPU speeds, the question has to be asked, "is C++ really needed for anything else?" AAA companies also have budgets and timelines and I have to think at some point the hardware will be specialized and fast enough to where engines can be written without C++. If gameplay is the only thing remaining then managed languages/scripting is far easier and cheaper and more flexible than C++.

What ever happened to physics cards btw? They were all the talk a couple years ago but they don't seem to be taking off.

I think C++ will stay where it is but its popularity won't improve. It will probably just remain... stable.

rpiller said, "What ever happened to physics cards btw? They were all the talk a couple years ago but they don't seem to be taking off."

My response: NVidia, a graphics card company, bought out PhysX, I think for their software. Then they now have GPU-accelerated physics or PhysX. I think the idea of physics cards is pretty much over now.

This topic is closed to new replies.

Advertisement