-5
\$\begingroup\$

C++, as I have seen, is being heavily used in 3d video game engines.... Is it because of the performance issues, legecy code or libraries such as DriverX?

If performance, libraries and code infrastructure are the reasons, dosen't that make C++ indispensible, at least for game engines? (ie, we have no other option even in the very distant future).

I asked this because, I have the right to know the upcomming future trends in game engines.

\$\endgroup\$
11
  • \$\begingroup\$ What is the problem you are facing? According to the faq you should ask questions based on actual problems that you face. \$\endgroup\$
    – AturSams
    Commented Oct 1, 2012 at 7:44
  • \$\begingroup\$ C++ is fast, but C++ can't be used in every environment. You can use C++ in Flash (Alchemy) theoretically, but it's converted and loses some of it's performance. That makes c++ a poor choice for a browser game, if You don't want to lose users who can't install a browser plugin (like in Quake Online). \$\endgroup\$ Commented Oct 1, 2012 at 7:56
  • 1
    \$\begingroup\$ More to the point, whatever you learn with c++ will be applicable to whatever comes next. \$\endgroup\$ Commented Oct 1, 2012 at 8:09
  • 1
    \$\begingroup\$ @MarkusvonBroady that probably won't change the way linear algebra works, to throw a random example. \$\endgroup\$ Commented Oct 1, 2012 at 8:18
  • 2
    \$\begingroup\$ Seriously? The future of C++ in game engines, again? Same answer, nobody knows: gamedev.stackexchange.com/a/37385/14808. \$\endgroup\$ Commented Oct 1, 2012 at 8:39

1 Answer 1

4
\$\begingroup\$

Some reasons off the top of my head because there are no, IMHO, technical no goers to have say a C# engine:

  • It has been like that for long time (so Nintendo won't send you a python engine because your team programs in python)

  • C++ is Fast (which is good not only for physics engines but also for scene node traversal, occlusion queries, ...)

  • I'm not sure about this but maybe (personal opinion here!) : You hire a C++ programmer because if you can program in C++ you are at least at a minimum level and can easily learn other languages / techniques. Maybe I'm just believing that there is some sort of C++ Lisp-like genius myth though.

  • C++ can be very efficient when it comes to memory usage. A low overhead of your triangle class is important when you want to load up 12 million triangles in your octree.

  • There are a lot of libraries compilers and tools, well tested, out there for C++.

But I guess it's most historical reasons.

Don't forget that many engines comes with bindings to other languages. They are coded in one (say C/C++) but can be used by another (say java).

\$\endgroup\$
4
  • \$\begingroup\$ By the reasons you gave, I have concluded that C++ will be here to stay for game engines till there is some 'heavy' radical change in hardware design, ie very very long future ahead. \$\endgroup\$
    – kasperov
    Commented Oct 1, 2012 at 8:55
  • \$\begingroup\$ Those changes might already be here! Like languages for shader programming and other parallel processors. They do bind nicely with C/C++ though :-) \$\endgroup\$
    – Valmond
    Commented Oct 1, 2012 at 9:45
  • \$\begingroup\$ so, are you saying that C++ is going down, especially in its niche of game engines? Whats replacing it? \$\endgroup\$
    – kasperov
    Commented Oct 1, 2012 at 11:01
  • \$\begingroup\$ Folks, please move this discussion to our chat. \$\endgroup\$
    – Ricket
    Commented Oct 1, 2012 at 13:27

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