The future of C++

Started by
67 comments, last by GameDev.net 17 years, 6 months ago
What do you think about the future of C++? Will it continue being the main game programming language in the next years?
Advertisement
Define "next years".

In the next 3-4 years, yes, because nothing is going to take C++ development to a screeching halt. After 5 or more years, it's too far away to decide on this yet (it depends on what consoles are released, who wins the console wars, how Windows Vista reacts, etc).
C++ isn't going anywhere, but I'm guessing that the game industry is reaching a stage where there no longer will be a single, dominant language. It's an industry that's in a rather unique position compared to other software industries because of the number of platforms available to games. More are opening up and will continue to do so. Such a variety of platforms creates a ripe environment for a variety of languages.

Traditional publishers have not yet taken full advantage of emerging trends and markets, nor has every door been opened to indies and basement coders. NCSoft experimenting with Java and Sun's entry into the MMO middleware world with the Sun Game Server are examples of the former, and Microsoft's XNA Game Studio initiative and GarageGames licensing models are examples of the latter. You can expect to hear about more such activity in the coming months and years.

Two or three years ago I read a post by one of the GarageGames crew bashing C# as a game development language. Now, he and the other GG guys are promoting their upcoming TorqueX engine, developed in C#. Even here on these forums, where C# and Java bashing was a regular past time, there is a notable decrease in the number "not C++" flamefests. Several shops have already been using C# for tools for some time, and NCSoft is using the open source JMonkey Engine for something they haven't announced. Attitudes all around are changing.

But as the attitudes change, people are going in different directions. Different platforms create new options that require different strategies. Once, the majority of the mainstream industry was coding for Windows. Now, the lines are blurring and the mainstream industry cannot be defined by AAA PC and console titles alone. Small indie shops are going head-to-head with major publishers in markets that didn't exist five years ago.

So all of this together creates a sort of melting pot environment in terms of language options. Java, C#, Python, Lua, Ruby, PHP, and everything under the sun is finding a role in the game industry. Even good old C still has a part to play.

For the past few years it's been pretty much a guarantee that if you move from one game shop to another as a programmer, you would be using C++ at both shops. Five years from now, I promise that won't be true. There will be no guarantee that you'll use the same language at any one of several shops you may work for. Game programmers are going to need to diversify their toolkit if they want to expand their options and stay competitive. Those who don't will most likely find themselves working in another industry.

So C++ is still going to be a vital thing to have on your resume, but it shouldn't be lonely on the page.
The biggest detriment to 'not C++' languages has previously been platform support. It takes time for newer language to spread to multiple platforms. Releasing a game for all three major consoles and the PC naturally requires a language portable to all of them. It won't be until newer languages are available on all platforms that we're likely to see a dramatic shift. This is already begining to happen. See XNA for an example, and the PS3 running Linux for another. Furthermore, managed languages have their advantages - but some games will always be pushing the hardware as far as possible, and will still benefit from writing parts in an unmanaged language like C++.
C++ hasn't been the "main" language for game development in many years; it's merely been the core language. Most higher level functionality in games is handled by scripting systems nowadays. Only the core engine -- the physics code, the graphics code, and the scripting engine itself -- are built in C++. (Naturally this varies from engine to engine.)

Will that balance shift soon? Certainly not. ToohrVyk says 3-4 years; I say at least a decade. The alternatives are not viable now, and they will not be viable any time soon. C# and Java both have many stigmas attached, and regardless of their actual performance, people don't trust them or know how to optimize them, and that's enough to screw those languages for some time. (People didn't even move to C++ for the longest time, remember.) Outside that pair, no other languages have really earned the popularity to be on the table. Python is known to be too slow, and Ruby is doomed in more ways than one. SML, Ocaml, and Haskell are so far out of the mainstream and people's normal experience that they'll never see any kind of penetration.

Not to mention you need extensive compiler support across all platforms. Even early and middle iterations of the C++ compiler for PS2 sucked (I'm told). That's why libraries like RenderWare are pure C. C# is too heavily attached to Microsoft in people's eyes to ever make it to the other consoles. I don't know if that will change in a decade, but things are looking pretty grim. Those who choose C# should do so with the full understanding that they are locking themselves permanently out of certain platforms. Game companies cannot afford to lock themselves out of platforms*.

Honestly, we're in a tight spot. People know full well that C++ sucks and we need something better. But no one quite agrees on what that better language should be, or how it should behave. Some people demand native code and manual memory management. Others insist that GCs are generally better performance systems than manual management. Some just want safer, cleaned up versions of C++ -- C#ish languages. Others want heavy influence from functional programming (like Haskell), or contract based programming (like Ada).

Don't plan on a big shift any time soon. C++ only survived because it was so close to C.

* No, choosing OpenGL or Direct3D doesn't affect your platform support.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
8-)
ai-blog.org: AI is discussed here.
"Those who choose C# should do so with the full understanding that they are locking themselves permanently out of certain platforms."

Hasnt Windows been the mainstream PC gaming platform for like 10+ years?isnt the Xbox360 supporting c#?isnt the xbox360 kinda like the best supported next-gen console?arent you expecting a next gen xbox?

PS3 has had a pretty bad starting rep already.
The Wii will either make games feel fun to play or make you feel stupid while playing them.

Mac,Unix...dont know of any gaming company that has had much winnings in $$ since what?1995?

My view is simply that windows and xbox are the best platforms for both comercial pro games and casual games and with the XNA giving a huge helping hand when it fully comes out.

Just think, if C# wont be that good with the 360 think of how good it will be in the next gen console.



This views are totaly personal and coming from an unproffesional who cant spall...
Quote:Original post by Anonymous Poster
This views are totaly personal and coming from an unproffesional who cant spall...


bu**er... I was going to summarize your post in that way, too!

Quote:
Hasnt Windows been the mainstream PC gaming platform for like 10+ years?isnt the Xbox360 supporting c#?isnt the xbox360 kinda like the best supported next-gen console?arent you expecting a next gen xbox?


That's not neccessarily relevant though. Windows is the market leader for installed user base, obviously, and that naturally translates to being the mainstream PC gaming platform. But the 360 is currently the "best supported" next-gen console because it's currently the only one on the market. Whatever negative PR the Wii and PS3 may have going for them at the moment, they will obtain market penetration of signifigant magnitude that professional studios cannot ignore them as potential markets, lest they risk their business via lack of diversity.

(I don't quite follow what you mean by your last question there; do you mean after the 360? If so, that's too far in the future to speculate about right now).

Quote:
Mac,Unix...dont know of any gaming company that has had much winnings in $$ since what?1995?


I have no experience with *nix environments in this respect (I'm considering the Mac market seperate, here, even though modern Mac OS is BSD-based). However, the Mac is a viable platform for shareware or indie developers (see Spiderweb Software, Ambrosia, et cetera), as well as professional developers who port PC titles (Aspyr). The market is not neccessarily worse, it is just different, having its own unique advantages and disadvantages. A game studio is not really likely to strike it rich making Mac games, but then again, a game studio isn't really likely to strike it rich making PC games, either. The nature of the industry on the PC side makes it much harder for a developer to turn a decent profit from sales, even though the market itself is larger.

Quote:
My view is simply that windows and xbox are the best platforms for both comercial pro games and casual games and with the XNA giving a huge helping hand when it fully comes out.


Unfortunately, this isn't correct. Windows is definately the obvious choice, true. But the Xbox isn't neccessarily the "best" console platform to be developing on, for professional studios. XNA won't signifigantly benefit professional studios, who cannot commit to C#-only codebases because that closes them off from other markets, which they can not afford to do. Such studios also have existing content pipelines that they may be reluctant to replace, even if XNA's content pipeline does turn out to be suitable.

XNA is wonderful for small-time developers or hobbyists, such as yourself. But large professional studios will not neccessarily get the same benefit from it.

Quote:
Just think, if C# wont be that good with the 360 think of how good it will be in the next gen console.

It would be wonderful, but again, it won't gain widespread professional use unless there is strong first-party support from the major console manufacturers to use it on their platforms. This will take a while; I'm not convinced it will happen by the next console generation (post PS3, et cetera).
Quote:Original post by Promit
Will that balance shift soon? Certainly not. ToohrVyk says 3-4 years; I say at least a decade. The alternatives are not viable now, and they will not be viable any time soon.

If you take anything from this thread it should be the line I quoted above. Also note the least in Promit's statement because in my opinion that is the quickest you would see if phase out.

I was around for the C to C++ shift where the game industry was one of the last software industries to make the change and were hesitant, and I don't see that happening anytime soon especially with any of the current offerings.

This topic is closed to new replies.

Advertisement