Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

GNU GCC is a very common compiler, but it seems like almost no one uses it for bigger projects like AAA games. To me, it's works just fine, never had a problem with it. But I wonder why all AAA games seem to use commercial compilers such as Intel Studio? Why does it matter? GNU GCC also optimizes the code for all systems rather then just Intel, so why do they bother with things such as Intel Studio?

share|improve this question
    
GCC was a very common compiler before LLVM/Clang came around, or saying it with clang: "gcc? Did you mean clang?" ;) –  Maik Semder May 15 '13 at 6:47
    
What does clang do? Is it a compiler? If so is it better? O_o –  CPP_Person May 15 '13 at 6:50
    
Clang is a c/c++ frontend for a compiler platform called llvm. Yes, its better in many ways. For starters it shows the exact error in a macro, not just the line where the macro was called. It makes stupid intelli sense look even more stupid, since it makes it easy to access the AST tree, no need for an extra parser. Partial code compilation, the list is long, take a look at it, its worth it :) –  Maik Semder May 15 '13 at 7:00
add comment

3 Answers

up vote 8 down vote accepted

Intel's compiler is just a different compiler. GCC++ and VC++ produce production quality code, just as well as Intel's ICC does. The main difference lies in 4 key areas:

  • a) Features supported (mostly differing on C++11 features)
  • b) Executable size
  • c) Runtime
  • d) Compile time

When you're trying to squeeze every last bit of performance out of (mostly) Intel CPU's, AAA studios are willing to pay for that and some spring for ICC. See here for a great anecdotal story. Pay attention to his drawbacks section as well, where ICC is accused of running less-than-well on non-genuine Intel instruction set CPU's (e.g. AMD's).

share|improve this answer
add comment

Many non-PC platforms, including some consoles and handhelds, use a modified GCC as their primary/only compiler.

On the PC, most game dev houses just use Visual Studio's compiler. The choice of compiler typically has little impact on runtime speed compared to engine design and graphics, they all paid for Visual Studio anyway due to its feature set as an IDE, GCC is comparatively harder to install and get started with. and it doesn't do much to improve iteration time and productivity. There's just not a compelling enough of a reason to use GCC compared to the alternatives that everyone is already invested in.

share|improve this answer
    
It's not just that GCC is a little harder to get started with, but MinGW requires shipping with a DLL if your application is multithreaded -- GCC uses a different exception mechanism than SEH which makes the DLL necessary on Windows. –  Dietrich Epp May 15 '13 at 2:32
1  
To provide an example, Sony moved their PS3 primary compiler from their internal compiler to GCC because it was deemed better. And there's no shortage of AAA titles released on PS3. –  Kaganar May 20 '13 at 15:34
    
The downside is that these platform-specific GCC's are usually severely out-of-date, usually pre-GPLv3 and hence pre-C++11 and also missing a lot of recent diagnostics and performance work. :/ This rejection of newer GCC by many vendors could be another reason a lot of game developers just avoid GCC if they can; they might have an unfair view of its state given experience with vendor toolchains. Look at the frequent Clang comparisons on Apple platforms where Clang 3.1 or so is compared with GCC 4.2. (I'm a Clang fan, but the comparisons are generally unfair.) –  Sean Middleditch May 20 '13 at 17:22
add comment

Yes, it can be used for AA games.

The reason almost every AAA games out there (if not all) use commercial compilers is the fact that commercial products usually have support and you can complain or get help 24/7 or just ASAP when dealing with any problem you might have and in the AAA industry, times means money. Big teams and companies, specially the latter, don't want to rely on the community when big money is at stake. It's better to invest in support by contract.

On the other hand, the engines rely on SDKs. If the SDK don't support a compiler, it means that you are on your own and it's not profitable to do the workaround.

Finally, optimization. If you know that a lot of players use Intel, the heck you want to deliver your game graciously for them.

share|improve this answer
1  
fyi our company with one billion turnaround every year is able toupport gcc and other gnu dev tools at premium level. –  lzap Jun 8 '13 at 15:50
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.