hello, i am a newbie who doesn't have any programming experience.
i heard that python is great to start with, but i prefer to begin with c++ because it's known as the best for game programming.
1) is it okay to learn c++ for a newbie?
2) is c++ really the best for game programming?
3) which software should i use to program in c++? (i am a mac user.)
a) Well, no C++ programmer starts as an expert ;) Some can say that you should learn C first, but don't listen to them...
I suggest starting with what you want to learn. Starting from one language and going to another is guaranteed to be harder. You will learn two languages with the expense of having invested some additional time. If you want to go to C++, definitely start with C++.
I'll recommed you to go for emacs for using c++ over mac OS.
Also, you need to learn this tool first as it's somehow difficult...
But once you got grip over that, you will enjoy working over..
C++ is often used for games because it is fast yet it has more features than C.
However, game programming is much easier and more succinct as an entry-level activity in Python than C++. In Python, it's pretty easy to set up PyGame and start working on your first game. In C++, you definitely have to spend some time and investment learning a lot of the language, as well as setting up your environment. C++ can not "draw" or do much graphically without external libraries.
For 2-D indie-type games, Python and PyGame shouldn't have many limitations in comparison to C++. C++ really shines in larger, more complex 3D games, or games that require a ton of real-time calculations (like realistic physics on 3d objects).
And as another poster mentioned, concepts can usually be transferred between languages.
For Mac, you should probably just use GCC. It's what most people on Linux/Mac use, and even a lot of people on Windows.
I think emacs itself uses gcc as it's compiler...
Am i right?
emacs is a text editor, and you can use emacs on a Mac...I certainly do. Aquamacs is one version of emacs available for the Mac.
thanks for all the great answers!
i'm so thrilled to start learning c++!
Originally Posted by honeythigh
wow, really? awesome!
Originally Posted by frog
you mentioned c. i'm planning to learn both c and c++ eventually no matter what.
just out of curiosity, among c and c++, which one is better to start with?
C is a simpler language, that is a bit closer to the hardware.
Originally Posted by honeythigh
C++ is more complex, and object-orientated. Which basically means you can create objects that are very reusable. For example, if you have a monster in your game, and all monsters have health -- logically they probably would. You'd have a monster class that contains variables like health, or perhaps it's name, and a ton of other variables, and even functions that might do things like calculate damage output. You can reuse this class, so you could just say that this dragon is a new monster, and the dragon would have all of that stuff. Or that kobold is a new monster, and the kobold would have health, damage output calculations, and all of that good stuff.
You can do similar things with something calls structs in C (C++ has them too, of course), but not as in-depth or as organized.
I prefer taking the path of learning C first, because you can focus more on learning the language, and then learn C++ later and you will be able to add object-orientated concepts into your current C knowledge. For me, taking in the concepts of object-orientated design and learning a language was a little too much.
They are both extremely similar however, so if you want to learn C++ first, by all means please do.
C and C++ are not similar. They are worlds apart.
There is no better language to learn first. If you are going to learn both, then you can pick either first. You are going to have trouble no matter what.