Krusty
Spy
- Joined
- Sep 21, 2003
- Messages
- 157
- Reaction score
- 0
C++ is used for execution speed and efficiency.
Let me elaborate:
Speed - C++ is compiled to native code where as C# is compiled to an intermediate language which is then interpreted by the CLR (common language runtime). This imposes a performance overhead since when classes are first loaded they have to be compiled.
Efficiency - .Net is a very handy language to program in since is discourages the use of pointers, and handles garbage collection for you automatically. Herein lies an effiency problem since you do not know when the garbage collector is going to run. In C++ you, the programmer, control this, hence you can avoid GCing at a bad time.
Finally, like most people have said, games programmers program in C++. Always have done, and will continue to do so for a considerable amount of time.
I'm not a games programmer myself, so code a lot in C# but use C++ when I need that low level control and pace.
Quake 2 was re-written in managed C++ a few months ago though, and seems to perform pretty well - after so hard-core tweaking though.
So maybe time will tell...
Let me elaborate:
Speed - C++ is compiled to native code where as C# is compiled to an intermediate language which is then interpreted by the CLR (common language runtime). This imposes a performance overhead since when classes are first loaded they have to be compiled.
Efficiency - .Net is a very handy language to program in since is discourages the use of pointers, and handles garbage collection for you automatically. Herein lies an effiency problem since you do not know when the garbage collector is going to run. In C++ you, the programmer, control this, hence you can avoid GCing at a bad time.
Finally, like most people have said, games programmers program in C++. Always have done, and will continue to do so for a considerable amount of time.
I'm not a games programmer myself, so code a lot in C# but use C++ when I need that low level control and pace.
Quake 2 was re-written in managed C++ a few months ago though, and seems to perform pretty well - after so hard-core tweaking though.
So maybe time will tell...