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

Hi all! I'm new here and I expect to make friends and learn from you guys smile.png

I was reading this article here : http://t-machine.org/index.php/2013/10/21/what-programming-language-should-aspiring-game-developers-learn-in-their-free-time/?utm_content=buffer4611f&utm_source=buffer&utm_medium=twitter&utm_campaign=Buffer

It was quite interesting to me since I want to become serious in game dev and here the author proposes that C++ may not be the game development language that is now. Do you people think the same? Which one else could be? Java, C#, D perhaps?

Cheers

Advertisement

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. The next biggest development platform for games are web-based games, often either playing directly using JavaScript or indirectly using Flash or another plugin.

If you want to be part of the big player AAA party you absolutely need to know C++. I include C++ in my list of must-know languages for game programmers even if you don't use it every day. Other languages are C#, Java, JavaScript, Perl, and Python. Even if you only touch them rarely, you really ought to be able to read the files and work with them on a minimalist level.

Also, having worked on many major game engines over the years, I can tell you that game companies rarely use full-on C++. Usually it is more along the lines of "C with classes". For various usually good reasons game studios in C++ code will disable exceptions and eschew large portions of the C++ standard library. Many C++ features come with a cost, and when it comes to the highest performance sections of code even those small costs are unacceptable. Inside a rendering engine the cost of a virtual function, roughly 7 nanoseconds, is unacceptably high. Inside a particle system the cost for encapsulated data, roughly 28 nanoseconds, is too high. The main gameplay code is a totally different matter, in AAA games it is often written in a scripting language that is run on its own time in a non-critical performance thread.

Learn and know all of those languages: C++, C#, Java, JavaScript, Perl, and Python. The effort of learning them at a rudimentary level is well worth the investment, even if that isn't the language you end up using on your day job for this project. A different language may very easily become the language you end up using on your next project.

C++ probably isn't going anywhere for core game development. Big parts of games today are written in other languages, like Lua, python, C#, Java, Javascript, that are more productive and can sacrifice top-tier performance where they are used to glue together low-level parts of the engine, implement game logic, and scripting events. D is interesting, and among those you listed is probably the only viable option to usurp C++'s role in game development -- but its young, doesn't have broad support, and doesn't have the momentum or legacy that C++ has.

At the same time, C++11 in a lot of ways makes C++ itself more productive, and it may actually reclaim a little bit of ground from the productivity and scripting languages. If your interest is in writing the low-level systems of AAA games (rendering, memory management, task-systems, AI building-blocks), then C++ is a necessary skill, and perhaps D might someday be viable. For gameplay things and non-AAA games, C# and Java are common, and Javascript, LUA, and python are viable in their own environments (Web Browser, Love2D, pygame, respectively), and are a good skill to have.

The other scenario that C++ excels at is cross-platform logic. If you write your android game in Java, or your iOS game in Objective-C, or your Windows Phone game in C# its difficult to port to the other platforms -- but all of these platforms support C++ in some way. The common pattern for cross-platform mobile games is to write the engine in C++, using something like LUA for scripting and maybe gameplay code, and then the platform's preferred language to deal with "platform stuff" like User Interface, filesystems, networking, and input.

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

Hi all! I'm new here and I expect to make friends and learn from you guys smile.png

I was reading this article here : http://t-machine.org/index.php/2013/10/21/what-programming-language-should-aspiring-game-developers-learn-in-their-free-time/?utm_content=buffer4611f&utm_source=buffer&utm_medium=twitter&utm_campaign=Buffer

It was quite interesting to me since I want to become serious in game dev and here the author proposes that C++ may not be the game development language that is now. Do you people think the same? Which one else could be? Java, C#, D perhaps?

Cheers

It depends. For AAA engine code C++ is likely to remain dominant for another 5-10 years atleast (There is no decent alternative available and the language most likely to replace C++ is a newer version of C++)

For game code however C++ have allready lost quite alot of ground to higher level languages (Allthough it is still being used in some areas).

If you are going to be serious about game development or programming in general you will have to learn multiple languages(C++ is one of the languages you should learn, but its not the only one you need to know and imo its not a good language to learn programming with), if you're just starting out i'd recommend going with Python or C#, they are both popular, reasonably easy to get started with and will remain highly useful regardless of what path you take in the future. (They're both used in everything from web development to AAA games)

[size="1"]I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!

I have a feeling D will end up in the same way as Eiffel, start with a few innovative ideas, single party keeps its thumbs on it a bit too long preventing a network effect, people feel no progress, it gets forgotten.

Assuming we're talking about PC-space (and earlier answers have covered other platforms quite well so it seems OK to limit my contribution to PC-space here) there are a number of quite fundamental technical requirements that a game (engine) development language must have:

  • It must be able to link to OS libraries, and these OS libraries - for legacy reasons - are more often than not implemented in C. This requirement generalises to "it must be able to link to C".
  • It must be COM-aware. Despite the current OpenGL resugence (and we still don't know that the full effects of that will be) and despite Microsoft's best attempts to screw things up, Direct3D isn't going anywhere in the timeframe you specify. Microsoft have announced D3D11.x as the XBOne graphics API and therefore using D3D11.x gives you portability between XBOne and PC.
  • It must be able to compile to native code. Managed code is great, but native code will still be the preferred choice even in 3 years time.
  • It must be compatible with code being written today. Code being written today will still be in use in 3 years time; very few people are totally willing to throw out perfectly good working code and start over without good reason, and switching to a different language "just because" is not a good reason.
  • It must be well-supported by middleware. Physics engines, audio engines, etc will still be used, and if no options are available for the language-of-3-years-time, that language won't be used.
  • Compilers must be available for the new consoles as well as for PC. The new consoles will still be current in 3 years time, and unless something totally unexpected happens, PC gaming is still going to be in the minority.
  • I could go on but I think I've covered enough now.

Of the language options currently available, I don't honestly see how it could be anything but C++, and the weight of legacy (which should never be underestimated) means that it's highly likely to stay that way.

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


The other scenario that C++ excels at is cross-platform logic. If you write your android game in Java, or your iOS game in Objective-C, or your Windows Phone game in C# its difficult to port to the other platforms -- but all of these platforms support C++ in some way.

<offtopic> It saddens me that after years of promising "write once, run anywhere", our best bet for cross-platform development is still the language designed to be an extension of portable assembly language... </offtopic>

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

Whilst games might not be written in C++ as much now, it is still used for plug-in development for 3D packages such as Maya. And on the same note, many 3D packages now use Python for scripting. So I wouldn't dismiss learning C++ too soon...

Languages; C, Java. Platforms: Android, Oculus Go, ZX Spectrum, Megadrive.

Website: Mega-Gen Garage

Doesn't every major gaming platform (besides consoles I guess but they are so closed off so screw them :) ) at this point support .NET in some way shape or form? Aren't there converters from .NET to mobile devices that aren't MS? Mono makes .NET available on Linux and Mac.

... LUA ...


Lua.

*grumbles*

This topic is closed to new replies.

Advertisement