3 ms·
Have you read the source some modern game engines? Doom 3 is an interesting example (a bit old now, of course) because it's not particularly C++-like; IIRC fro
by tokenrove 13y ago
Have you read the source some modern game engines? Doom 3 is an interesting example (a bit old now, of course) because it's not particularly C++-like; IIRC from the last time I looked at it, C99 would do effectively everything it needs. This is not uncommon in the game industry.
The game industry uses C++ because most of it is consistently about ten years behind the rest of the industry (remember how long it took them to switch from asm to C? and then from C to C++) -- the charitable viewpoint for this is that the industry is conservative; this is also a consequence of the toolset in the embedded world.
Any natively-compiled language with a good compiler will produce pretty fast code without too much work, but to get really fast code in any language, you really need to know what the compiler is doing and be able to tweak it from the language; writing really fast code in C++ requires about as much work and as much thought (but less knowledge of your target compiler and runtime) as writing really fast code in Common Lisp or Scheme.
It's important to note that it's actually easier to write slow code in C++ than in C if you're not careful; C++'s powerful abstractions cut both ways. Unless you explicitly forbid a number features, C++ takes away your ability to look at an isolated block of code and get an approximate "in-head" assembly of it.
All that said, if you want to work in the game industry, you need to learn C++, you have no choice. But at the same time, you could be experimenting with building games in newer languages like D, Rust, and maybe more exotic choices like SML using MLton or Gambit Scheme (maybe using Stalin for a final pass).
I hope this is helpful.