| lectricpharaoh |
Aug 13th, 2007 2:21 AM |
Depending on the type(s) of game(s) you're aiming for, I'd go with C++ or C#. There's no need to learn C before C++. In fact, though the syntax of the two is quite similar, many of the concepts are different, and by learning C first, you'll build habits that (while making you a good C programmer) are ill-advised for C++.
My suggestion of C++ applies if you want to code demanding games (complex 3D games, in particular). C# isn't quite as good for high-perfomance 3D (though it's certainly closing the gap, with improvements in Managed DirectX), but in many respects, it's a much easier language to work with. If you're planning on simpler games, such as 2D games or 3D games without a lot of fancy effects, C# would be a better choice, in my opinion (assuming, of course, you're developing for Windows).
Though C++ code is, in theory, more efficient, in reality, the difference is small. First, .NET uses 'just in time compilation', where the bytecode is compiled to native code when the program is run (and cached, so subsequent function calls are full-speed). Second, for games, much of the performance is offloaded to the graphics hardware. Lastly, using a language such as C# provides certain features to help prevent common problems, such as memory leaks, which can impact performance (among other things).
Having said all that, you can write games in just about any language you choose, even Visual Basic or Pascal.
|