5 ms·
Offtopic question : Will C++ remain the industry standard, at least in its niche of game engines in the distant future?
by z3phyr 14y ago
Offtopic question : Will C++ remain the industry standard, at least in its niche of game engines in the distant future?
- archivator 14y agoI think with the advances in C++11, that's even more likely to remain the status quo.
- Jach 14y agoAlmost certainly for the next 10 years, but we'll see. The one language I see on the horizon of even having a chance at displacing C++ at the top companies is Rust. A lot of companies already make use of custom scripting languages for parts of the game logic or design or AI behavior, some of them even use Python or Lua. If that trend continues to gain in popularity and, just as importantly, if toolchains capable of working with such environments improve or are created in the first place, we might see C++ relegated to graphics- and physics-engine stuff only (and slowly dying there) whereas the rest of a AAA game is in a higher level language. I've read that everyone loved GOAL (a lisp) at Naughty Dog once they got used to it, but when Sony bought them out there was no toolchain integration on Sony's side and Andy Gavin had left so no one really had the expertise to carry GOAL further. I'm happy that JavaScript is becoming popular for games, since in my conversations with game programmers it seems the biggest hurdle to even evaluate another language is their ignorance about what other languages give them that C++ doesn't.
- pjmlp 14y agoIt was always like that. It was a pain to move developers from Assembly to C and then again from C to C++. I know of some companies making use of D, but it is still a single digit set of examples. C# is becoming widely used thanks to Unity, but it is still C++ at its core
- kibwen 14y agoThere have actually been employees at one large, undisclosed game company poking at Rust, curious to gauge its suitability for writing game engines. It's far too early yet to make that call, but the interest is definitely encouraging.
- z3phyr 14y agoDo you have any links to support this?
- kibwen 14y agoSorry, I don't. This conversation took place on IRC a while ago (maybe a month? less?) and I can't recall the specifics. All I remember is that it was a company large enough to have an R&D division (the user politely declined to mention the company's name), and that he'd been using Rust for several months--highly suprising given the incredibly volatile state of the language throughout the past year. If you're dead-set on a citation, you can check the IRC logs at http://irclog.gr/#browse/irc.mozilla.org/rust/ http://irclog.gr/#browse/irc.mozilla.org/rust/ ...but be warned that the search function is rather lacking (I had no luck remembering any terms to conjure the correct results). Your best (and most tedious) bet is probably to just run backwards in the history until you find it.
- pjmlp 14y agoWith the advances done in C++11, the answer is pretty much yes, at least until another language with native compilation takes its place. Even Microsoft has started to deploy native code for .NET Windows Phone 8 applications with the MDIL format. A C++ replacement in the game / graphics area needs to provide the same mix of hardware control and abstractions that C++ provides. Currently I only see Ada as possible contender, but it is considered too verbose by many developers. D and Rust still need to earn the hearts of the games community and become more stable.
- z3phyr 14y agoSo Managed languages with a VM are bad for Game-Engines??
- Arcanum-XIII 14y agoGarbage collection is...
- z3phyr 14y agoD is garbage collected. So is C#.
- dkersten 14y agoLast time I looked, you could turn the D garbage collector off (both completely and temporarily). While Unity uses C#, it still seems to use C/C++ components for graphics and physics and such (going by the libraries it uses internally, anyway) and allows you to call native code if you wish.
- p0nce 14y ago> Last time I looked, you could turn the D garbage collector off (both completely and temporarily). You can, but it's hard to ensure a strict no-allocation policy afterwards (someone did it recently). A moderate amount of allocations each frame is usually ok, and this routinely happens in C++ engines too. In my opinion, it's absolutely possible to make a game with D and GC enabled. It's a bit like not making too much drawcalls in a frame. Eg. for this game I only made one struct pool and that was it: http://www.gamesfrommars.fr/wormhol/ http://www.gamesfrommars.fr/wormhol/
- dagw 14y agoProbably, however C++ is changing with the times (if perhaps slightly slower than some people would like). C++ written today taking advantage of everything that C++11 brings looks quite different from C++ written 15 years ago. And likewise I imagine that the C++ that will be written 15 years from now will look equally different from the C++ written today.