The net is full with questions like that, and usually all the kids asking them get the same idiotic answer: C++. Sure. As if they all had the skill set and the will to write their own Quake 5 engine from scratch. As if using the object-oriented abomination of the low-level system language C would really be helpful to somebody who wants to learn how to create a game.
The funny thing is that it’s probably a safe bet to presume that most people giving that advice either have never written a single line of code in their whole life. Or maybe they know how to write a business app (at best), but have only read about game programming.
There’s so much wrong in advising people to start their programming career with C++ that it’s almost impossible to know where to begin with listing all the reasons.
How about we start with what Alan Kay, one of the fathers of object-oriented programming, said:
“Actually I made up the term ‘object-oriented’, and I can tell you I did not have C++ in mind.”
Oops. I guess that is a severe blow in the direction of all those people who recommend C++ –because– it is object-oriented, among zillion other things that it also tries to be, and all of them at the same time.
Another re-occurring argument is that “it gives you full control”. Well, it does not give you full control, it –forces– you to take full control, because you have to manually take care of everything yourself. (Yes, I know that there are garbage collectors available for C++, thank you very much.)
Languages like BlitzMax, Python or Java have a garbage collector built in, so the programmer does not have to clean up behind himself all the time. One of the most important results of this is increased programmer productivity: Actually, the developer can focus on his goal instead of testing his code for memory leaks and unpredictable crashes because of memory leaks. Not having a garbage collector slows you down significantly, while not giving your application/game a noteworthy performance increase in return.
“C++ code runs so much faster than <xyz>.” Maybe, but it is still slower than plain C or Assembler code, and probably also slower than Pascal code. But that does not matter. What matters is that you have to pay a high price for that increased performance, not only because of its low-level nature, but also because of the complexity of the language and its, in my eyes, extremely ugly syntax. And to really obtain and harness that increased performance, you have to really know what you’re doing. And beginners hardly fall into that category of programmers.
A former boss of mine once said something like “whoever uses C++ for application development must have masochistic tendencies”. I’ll put my signature under that.
But ok, we are not talking about applications here, but about game development. And C++ is the de facto standard in the gaming industry, right?
For ENGINE authors, yes. But the game logic - the FUN part - is nowadays usually written in a scripting language like LUA or Python (Civilization IV, for example). Even C# and Java have been used for this.
So unless you really want to learn how to write a game engine from scratch, you might find out that you do not have any need for wasting your time on C++ AT ALL.
And if you’re a real beginner, you neither need nor want a frustrating steep learning curve. You want to see something grow and you need to have fun while you are writing code.
Python is a much better language for learning various programming concepts and for getting something done quickly than C or C++ or even C# and Java, and the pyglet module might be a good starting point for you to enter multimedia and game programming.
BlitzMax is a very popular programming language among successful indie game developers and the Blitz family of products have a long tradition and track record. Take a look a “Eschalon: Book I” by Basilisk Games to see what can be done with BlitzMax, or look at some of the games developed and published by Grey Alien Games. There are hundreds of others. Better just check out the BlitzMax webpage and their gallery.
In the end, it’s more important to actually get a game done than what language you use for it.