C vs. C++
To answer your original question, if you're torn between learning C or C++ first
, the answer is most definitely C++. C++ is the standard language currently used in the game industry, and has an object oriented paradigm more suitable for representing game entities and systems than ANSI C.Regarding Python
To respond to the somewhat heated debate, Python is a perfectly fine language (scripting or otherwise) for learning to program. And with the help of Pygame, actually DOES allow you to implement fully functional games. Although it is strictly speaking "slower" than compiled C++, I've seen bad programmers develop poorly implemented C++ code which does, in fact, run slower than Python. Speed as a reason for NOT using scripting langauges
While it is largely intuitive, more formal programming paradigms such as "eXtreme Programming" have made clear the concept of "Optimize Last", which simply means that optimization is the last thing you should be focused on when developing...well...anything. So as a beginning game programmer, the execution speed of the game is more or less irrelevant.C# and Video Games
C# has a syntax more like C/C++, is also extremely powerful, and provides access to XNA - a set of libraries and a build system designed to make developing games easier for beginners and hobbyists. As well, being a .NET language, C# has access to the .NET Framework Library which means far less must be implemented by the developer, leaving more to the good folks at Microsoft or Mono to implemented for you.Introducing IronPython
And speaking of .NET, you might want to check out IronPython
. IronPython is an extremely fast implementation of Python, written entirely in C# (well, mostly), and giving Python access to the .NET Framework Library, allowing people to develop entire WinForms applications in Python. BOOM!Java and Video Games
Next, Java does have OpenGL bindings, but does not have DirectX bindings that I'm aware of. This means if you want to use the full DirectX 9c or DirectX 10 interface - you're stuck with C++. Promit and others here on GDNet are working on SlimDX, which is a managed wrapper giving access to DirectX 9c and DirectX 10 via Managed languages such as C#, C++/CLI, VB.NET, and...wait for it...Python. I'm not sure what percentage of coverage they now have, however, which is why I didn't mention it earlier.People's inability to use the search feature
Finally, yes, this question has been asked and answered 100,000,000,000 other times here on GDNet. (Seriously, I counted). Before asking this question again, please do a SEARCH for C++ vs. C or somesuch here on GDNet. You're bound to get good answers, without ever having to ask a question. As well, this needs to be updated in the Forum FAQ
. (Not that anyone reads it anymore).
Alas, I'm now ranting. Please bring this thread back to a civil level of discussion or I will close the thread.