OK. I think this thread wandered along away from it's original intention - Helping Lucaz decide on which programming language to learn programming games with.
So I'll answer him with what I think on this issue.
What I have to say might be kinda long, but this is because I'll try to explain kinda deeply every statement I'll make.
What kind of games do you wish to make?First, I think it should be good for you to decide on what kinds of games you want to make. Heavy, big games, like Half-Life, Gears of War and Sins of a Solar Empire or smaller ones, like the ones you can get for free on the net?
I know that for the first attempts you should focus on small ones, but I'm talking about what your final target is. After you've finished all the books and tutorials and game examples. Where do you want to reach?
Difference between programming languagesSecond, I think that it should be good to distinguish the group of programming languages C++ belongs to, and the one where Python belongs.
In short:
C++ is a classic programming language. By "classic" I mean that your code is turned into binary commands for the computer to interpret prior to executing the application (or game).
Btw, the action of turning the code into binary commands is called "compiling". This "compiling" must be done, because the computer doesn't understand the english language you program with. It only understand numbers, memory addresses and electrical surges.
Python is a scripting language. By "scripting" I mean all of the code you write is already compiled and ready for execution beforehand.
Also, in scripting languages you usually have to be less specific in details on what you're writing.
For example:
In C++, when declaring a variable (it's like a a memory block which holds data for you), you have to state which type of data it will hold - like a full number (integer), a fraction number (float), letters (strings), etc. etc.
E.G.
integer a = 17In Python, for example, you don't have to do that. You just say
a = 17 . This variable statement doesn't have to be compiled into binary, because the binary is already existent for you. Python just takes this statement and executes the binary commands necessary to do what you want. It has all the of the binary commands ready in its libraries.
At first this sounds as an advantage for Python, because it removes the necessity to compile everything you write prior to running it. Also, it removes the necessity to write more code.
However, this is also a disadvantage, because every statement and command in a scripting language takes a longer time to execute than it's "brother statement" in a classic programming language. This is because the scripting commands are more "general" and have lots more binary commands to run behind the scenes rather than the more specific commands in a classic language.
Just because you don't state what kind of data your
'a' variable will hold, doesn't mean the computer doesn't have to allocate memory on your computer to save that data. The specific amount of memory changes by each data type (full numbers/integers use a lot more memory room than letters/strings).
So, in Python, for example, since you don't mention what type you'll hold into this
'a' variable, the computer just allocates a lot more memory room for this variable than is needed.
In C++, it allocates just the amount it needs, since you declare it when you create this
'a' variable.
So basically, classic languages are more on speed of execution, but are less comfortable and harder to learn. However - You also learn a whole lot more.
Scripting languages are slower but more easy to learn. However, you miss a whole lot of the important stuff that is needed in order to program good.
Knowing to program "good" is a necessity, because you wouldn't want your games to be sluggish just because you didn't know the faster ways to write them, right?
This is just a small example to show the differences, pros and cons of each.
What I recommend for both typesBefore I'll tell what I think you should start learning, I'll give some detail on which are (by me only) the best programming language for each group I've mentioned.
These are of course, C/C++ and Python. That's why I used them in my examples earlier.
C/C++ is the most popular language for writing games, especially "big ones". The application runs a lot faster than other languages (except using Assembly-like languages, but I'm not even going to talk about it) and gives you the most control over each aspect for your program.
Python is my choice for a scripting language. For two reasons:
- It has a really comfortable syntax. A lot more than Perl, anyways.
- It has a really, really, REALLY huge database of user-made libraries that can help you and allows you do almost anything you'd want with programming. PyGame is a good example of this. Ruby and Perl don't have such a large database of libraries.
What I think you should start onOK, now for the big "what I think you should begin with".
I contradict with what most people said I here. I don't think you should start programming with a scripting language, like Python, Perl, Ruby, and such.
I think you should start with one of the more classic ones. C/C++ would be a good choice.
Why?
It's easy, because
you'll learn a whole lot more than with learning Python.
I don't think that it will be good for you to start learning Python, where you'll miss a lot of the important stuff, and then move to C++, where you'll learn all the rest. You'll eventually feel very uncomfortable with all the more complicated stuff and just abandon them.
It will be good practice to start learning from the harder stuff and then going back to the easier stuff. You'll also understand when and how to use classic and scripting languages better, because you'll know the differences a lot better.
I don't want you to think that learning C/C++ is a lot harder than Python. It isn't. However, it takes more time and a bit more dedication. You'll get a lot more benefits if you'll do this.
Most of the programmers start with learning C/C++ and it's brothers, like Delphie/Pascal, Java, Basic, and such. It lets you learn a lot more.
I heard of a guy that started with Assembly, and he is, like, the king of programmers now. He understand every bit of every thing.
Have a friend help youYes, I agree with the rest in here. Have someone guide you. It's not that easy learning to program by your own.
Besides, the first thing to learn before programming is learning how the computer works (CPU, Memory, I/O, BUSes, Addresses, etc. etc.)
The EndPhew, that was a long post.
Hope I helped you.
Cheers,
Orestes