|61 posts found|
4/27/12 5:03:48 AM#61
C# isn't used for demanding games since it's a managed language (it uses a JIT compiler unlike C++ or C, it's comparable to Java) and it doesn't play well with the libraries of DX and programmers like C++ because it's easier to port their game to other platforms like PS3 and Xbox if their game doesn't have to deal with type differences between C# and C++. All big gaming engines are written in unmanaged C++, programmers who need to access those libraries do not want to deal with type restrictions or syntax issues, so they use C++ instead of C#.
Some people call C# code safe code, and C++ unsafe code, it all relates to how C++ and C# deal with types and how they handle objects and memory management.
I learned C/C++ and C#. There's really not that big of a difference between C++ and C#, types are more restricted and better defined in C#, objects creating and destruction is managed better, but other than that the differences are pretty small overall.
I would learn C++ instead of C#, the survival of C# depends on one thing, it depends 100% on the survival of Microsoft. And we all know they missed the boat a lot lately, they're not very strong in the mobile or tablet space, a huge gaming market, so C#'s survival is pretty bleak atm.
As far as books or online study, I frankly hated online resources, there are so many good cheap C++ books out there that I can't recommend wading through online resources.
Online resources tend to focus on the programming side only, they don't explain what a compiler does, they don't explain how it interprets syntax, they don't explain what a linker is, they don't explain how you go from what you write to the actual machine code. Those 20 first pages in a good C++ book or book about compilers will teach you more about programming than any online resource ever can.
A site I loved when I programmed a lot is http://stackoverflow.com It's a huge community of programmers, many excellent people there and you literally will get an answer within a minute on any programming issue. (it's not a site to ask if C++ or C# is better, it's a site for when you start programming and you run into an issue)