0
\$\begingroup\$

C++11 has opened ways, which were only dreamt by the C++ programmers. It has been three years since I have been learning C++, and I am going well. Now I want to get into video games. Every core of the game code I saw, was monstrously written in C++. My question is - If I get into serious game engine dev, and perfecting it would take, maybe say 10 years, would we still be writing game engines in C++ ?(newer standard)

Or, will John Carmack, write id tech 7 in c++?

note - I am strictly talking about game engines.

\$\endgroup\$
3
  • 2
    \$\begingroup\$ Even if they aren't, it will be easy enough to learn a new language that's being used at the time (C#, something that isn't invented yet, etc). \$\endgroup\$ Commented Sep 20, 2012 at 8:14
  • 3
    \$\begingroup\$ -1, because the question is open-ended and discussion oriented. Nobody can tell what technology in 10 years will look like, let alone what Jhon Carmack will use to write ID tech... \$\endgroup\$
    – bummzack
    Commented Sep 20, 2012 at 13:10
  • 1
    \$\begingroup\$ I vote to reopen. Of course you can take the question literally, but I think the OP was also asking "Is this a good idea to try to master C++ now to become a professional game developer?", and I don't feel like that isn't constructive. It's actually a very accurate question, today C++ is no longer the complete ruler of programming languages for games, so students need an answer to that. \$\endgroup\$ Commented Sep 20, 2012 at 17:01

6 Answers 6

7
\$\begingroup\$

Short answer: yes, game engines will probably be still written in C++ at least for the next 10 years or so.

Long answer: big parts of engine code still include C. Members of the C++ standards committee have been trying (or at least dreaming of it) to close down the pointer arithmetics part of the language in favor of "safe" C++ (the STL/Boost crap that is the complete opposite of what game developers need). [proof] As soon as any big push is made in that direction, I assume that the developers will promptly disconnect from the latest standard (if they haven't done that already).

Protip: the language doesn't matter for a good programmer. If you're interested in being one of them, I'd suggest you to try working with lots of different languages and focus on generic concepts that can be applied everywhere.

\$\endgroup\$
7
  • 6
    \$\begingroup\$ +1 for the correct answer, -2 for the random incorrect C++ standard claims. \$\endgroup\$ Commented Sep 20, 2012 at 7:40
  • 3
    \$\begingroup\$ I think you missed the ":)" in that post, and have way too little faith in Herb's considerable experience and practical understanding of C++. \$\endgroup\$ Commented Sep 20, 2012 at 8:35
  • 2
    \$\begingroup\$ He may have practical understanding and experience, but he appears to be disconnected from one of the biggest target audiences of C++. \$\endgroup\$
    – snake5
    Commented Sep 20, 2012 at 8:48
  • 2
    \$\begingroup\$ Having spoken to him personally about gaming, and knowing a number of his colleagues, i don't think so. :) \$\endgroup\$ Commented Sep 20, 2012 at 17:09
  • 5
    \$\begingroup\$ That's the same thing you're doing - making wild claims about what where C++ might go based on a single contrxtually questionable mailing list post. Your claims were not useful, provable, or even logical (C++ can never stop supporting what it does already, as the committee is outright hostile to breaking back compat) to the question, which is why I voted it down. Simple as that. \$\endgroup\$ Commented Sep 20, 2012 at 19:17
3
\$\begingroup\$

Will we still be writing game engines in C++ [in ten years from now]?

No one can tell.

Ten years is quite a long time when speaking about programming languages. In the beginning games were written in assembly, then there was a major shift towards C, then a major shift towards C++. There's arguably quite a big shift towards more "modern" languages (such as C#, Java, Javascript...) now that the mobile & web games market is taking so much space, even if C++ remains strong in the PC & console world.

Is this situation going to last long, like in until-2022-long? Really, you shouldn't bet on it.

My belief is that one of the main technical reason why we still stick to C++ is memory management: with consoles being so limited memory-wise, you can't afford to leave the memory control to a virtual machine. So if next-gen consoles come with a massive amount of memory, C++ as we know it might very well disappear.

But it's even disputed if the next-gen is still a relevant concept. Maybe the living-room convergence people have been talking about for years will finally happen, and there won't be a market big enough to keep the AAA game industry as it stands now. Maybe cloud gaming will become the norm and games will be running on huge server farms that won't require such a fine-grained control of the machine.

Or, will John Carmack, write id Tech 7 in C++?

Still, no one can tell. Just look at the previous id Techs:

It's not even clear when will id Tech 6 come to life, and what it will do exactly, how could one predict which programming language an hypothetical id Tech 7 would be written with?

That said, as others answered, my feeling is that C++ is here to stay for a while, but I might be wrong. I suggest you read Scott Meyer's Effective C++, Third Edition, if you didn't already. The author explains how C++ contains already 3 different paradigms in one language (procedural, OOP, template-based): one could imagine a fourth paradigm becoming popular in the games industry in the near future, learning about it would be like learning a whole new language.

Now what you need to do is not to focus too much on the programming language. Of course becoming a C++ guru now gives you a good chance to get a job in the mainstream games industry. But what you have to master is software engineering, this will certainly stay viable for quite a long time.

\$\endgroup\$
1
1
\$\begingroup\$

"It depends". If you're aiming to work at id or Blizzard then your best bet is C++, but if you're going to work in a small studio then it can be anything, HTML5/CSS3/JavaScript, Flash, C#, Java, etc. simply because most small titles don't need the power of C++ and these other languages allow for faster and easier development a lot of the time.

You're going to be writing "serious" game engines no matter the language of choice. It's a matter of the sector you want to be working in. All i can tell you is that setting your mind on only one language is bad. It's like only driving SUVs, while there are dozens of other types of cars that all have a steering wheel and a gear box.

So will C++ stay viable for game engines? Yes. Will it be the best language to use? It depends on the studio, the target platform and the type of game they'll be making.

\$\endgroup\$
0
\$\begingroup\$

C++ is probably the most stable language in the moment:

  • It just got modernized with the C++11 specification.
  • C#, which is the largest rival at the moment seems to be crumbling with Microsoft switching back to C++ as primary language and abandoning XNA.
  • D is still far away from being any serious competition.
\$\endgroup\$
4
  • 2
    \$\begingroup\$ "Microsoft switching back to C++ as primary language" ... do you have references on this? I didnt knew about that. \$\endgroup\$
    – fableal
    Commented Sep 20, 2012 at 8:05
  • 1
    \$\begingroup\$ @fableal Probably nobody has, Microsoft usually does not make such news public and if they do, they never sound like that.. it seems there's no XNA continuation plans and the VS2012 support for it is almost zero. All that people hear are rumors, and these spread.. \$\endgroup\$
    – teodron
    Commented Sep 20, 2012 at 8:54
  • \$\begingroup\$ @teodron, The new gaming-console cycle is about to start as well. Perhaps they are working on a newer framework. Or maybe not. \$\endgroup\$
    – Sidar
    Commented Sep 20, 2012 at 11:30
  • \$\begingroup\$ -1 for spreading rumors. :/ \$\endgroup\$
    – Cypher
    Commented Sep 20, 2012 at 16:54
-2
\$\begingroup\$

In case of AAA or AAAA game engines, I think that C++ will be majorly used for (Virtually) eternally...If you want to go into any big studio, go for C++, they wont switch(at least, in case of game engines).

Indie games have a different story-- C++ will be there, ( Unity, Panda3d are actually writern in C++ :) but the focus will be on beginner freindly languages.

\$\endgroup\$
1
  • \$\begingroup\$ -1 All of this sounds likely, but is too subjective without any sources or helpful guidance. \$\endgroup\$ Commented Oct 4, 2012 at 21:05
-2
\$\begingroup\$

C++ isnt going away any time soon. C#, Java. . . all these managed languages can be used in actual game, but they will always run on an engine in native language. . for example, rust, c, c++.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ -1 too subjective without any sources or helpful guidance. You don't explain why engines won't move from c++ to higher level languages, just as we moved away from assembler in past. \$\endgroup\$ Commented Oct 4, 2012 at 21:06

Not the answer you're looking for? Browse other questions tagged .