Ask HN: C++ as video game industry standard in next 10-15 years?

3 points by z3phyr ↗ HN
The C++ standard is making strides, and compilers like Clang are improving it by great degree. PS4 and XBoxOne are about to release, with Steambox sticking like a surprise. New game engines, writern in C++ (unreal, leadwerks, project anarchy, unity3d) are filling the room.

Will C++ remain to be used as the standard language for high performance video games (their game engines) for 10-15 years?

3 comments

[ 7.2 ms ] story [ 15.1 ms ] thread
I'm certainly not qualified to make predictions even for next year, but one thing I believe and truly hope we'll see more in the gaming industry is Haskell.

Any complex software like games, or at least core parts of them, can really benefit from the guarantees and trade-offs Haskell provides, such as near-C performance, compile time type checks, controlled side effects, etc.

It depends on situation of video game market, industry will look after other tools if it falls into trouble.
For console games C++ is unlikely to be replaced in the near future, although an ever increasing portion of the game code is likely to be written in a scripting engine on top of and underlying C++ base. Of course, the main reason that the engines are written in C++ is that that's what the toolchain provided by Microsoft/Sony/Nintendo supports, so there aren't really any other options unless you want to write your own compiler. There are however a few good reasons to use C++ for console games.

Console games have some fairly unique restrictions which are difficult to meet in other languages. The most major one being that they usually have predefined memory usage maps, and often disallow allocation/deallocation for large parts of their runtime. This means that garbage collected languages aren't really an option unless you have tight control over the collection itself. Also to squeeze as much data into as little memory as possible games often use custom allocators which can take advantage of the fact that the memory layout is mostly known ahead of time and is mostly static.

The other bonus of C++ is that you can drop down into assembler, either to speed up a certain portion of code, or to work around a bug in the compiler chain. Because the toolchains tend to be targeting fairly unique systems, they tend not to be as mature as toolchains for the PC so both of these situations can, and do, occur.

With the ever increasing amount of memory available in consoles it's possible that they'll reach a point where they won't have to have as tight a control over the memory, but mostly when extra memory is available it's quickly filled with larger textures, more detailed models, higher fidelity physics maps, or more AI agents.