A good tutorial regime for someone looking to be a games programmer might be something like:
Absolute beginner
- Basic data types; int, bool, float, double, char
- Arrays and Strings.
- Input and Output.
- Selection.
- Iteration.
- Methods/Functions.
Don't just do these things one way either try and see how many different ways you can go about things. With selection learn
if statements, if else statements, switch statements and ?:;. With iteration learn all the differen't kinds of loops. Once you learn how to use methods go back to iteration and learn how you can accomplish the same things with
reccursion. These are for the most the foundations of all programming languages, if you explore them in-depth you will find yourself becomming very familiar with your chosen language.
Test your skills
- Make a simple command console based game. Use letters/characters to represent the objects in the game. Try making it 'realtime'
Congratulations; you are now a games programmer... In that you made a game :D
AdvancedNote there is no intermediate
- Object-oriented programming (there is alot more to cover here).
- Pointers.
- Multi-threading.
Expect to feel a little lost when it comes to this stuff you will likely have an 'oh now I get it' sometime and suddenly the world wont be such a scary place. OOP, pointers and multithreading all need different mind sets, multithreading can be skipped if you want.
The OOP (object oriented programming) stuff is important to get right, as a lot of data-structures and programming paradigms are either dependant on OOP, or are typically expressed in OOP. Seeing as you are using C++ you will be needing to know about pointers. Pointers link in to OOP for things like linked-lists. Which is an abstract data-type. which brings me too...
Abstract Data Types/Data-Structures
I'm not going to say all the ones you should learn, because it depends on your goals. But this is where you are starting to lookup proven structures that people have made. There is alot to cover here, and it can be a bit dry so I don't reccommend tackling it on it's own. I suggest coupling it with some graphics/games programming. If you do that you might even find some examples of where these data-structures are used, such as with binary trees etc.
Graphics
By the time you are up to graphics you will be a pretty accomplished programmer, I would say learn about this at the same time as ADTs. Choose a graphics API, I reccommend OpenGL personally, look up about matrices calculations, translation, rotation, scaling, pushing and poping, as these are how the maths works behind the scenes (its actually important knowing whats going on behind the scenes with these particular things). Obviously you will also need to learn how to create an OpenGL window, etc. Which brings me to the point of Windows Programming, you don't need to learn how to program OS based code, actually it's very important you don't get caught up with it. I remember when I was getting into OpenGL I almost ended up learning windows programming because I tried to find out what ever obscure windows call did when setting up a window. There's alot of code and you really only need to know how a window handles messages.
Test your skills
- Make a simple game. Something basic, like a simple asteroids game. Anything you do in openGL can be done in either 2d or 3d, I reccommend making 2d but in actuality you could just as easily make a simple 3d game if you have a good understanding of 3d.
Game related maths and paradigms
Vectors! Very important... if you are smart enough to have gotten this far then you can probably make up alot of ways of going about solving problems like collision detection, etc. That said it helps to look up how other people do it, as there is no point in re-inventing the wheel and I assure you people have done things in better ways then you
. You should look into singletons (this should probably happen after you have a solid understanding of OOP and pointers). Model View Controller is a must to learn if you plan on making any big projects. Don't be afraid to read up on these kinds of things during the
Advanced Stage of learning as it puts into perspective alot of the usefullness of OOP. That said, you probably shouldn't attempt this kind of programming that early, just understand the concepts behind it to make OOP feel more useful.
Test your skills
- Make a game engine and remake your simple game within the engine or a similar simple game. DONT get caught up in this, you will likely dump the engine afterwards, this is just so that you understand how these differen't paradigms work and how a big project could be put together.
Congratulations; you are now an openGL games programmer... In that you made a game with openGL :D
By this time you are ready to dump your engine and use someone elses, look into the technologies behind things such as scripting. Realistically it's usually impractical to use your own engine unless you are making a simple project.
Advanced challenge if you want to get into 3d
Make a simple 3d model loader (MD2 is reccommended).
Expand your model loader to allow for keyframe animation.
Expert Games Maths
- Quaternions vs Euler rotation
- Inverse kinematics/bone animation
Learn what quaternions are and how to use them...
Expert Graphics
Learn how to write your own shaders if you are really into graphics programming.
Expect to take years before you are truelly accomplished. If you have gotten to the stage where you are using someone elses game engine and have dumped your own then you are of about the average level of someone leaving uni that did a games degree I would think. The beginner topics wont take you nearly as long as the rest to explore which is good
. A final word of advice, obviously don't get ahead of yourself this list is a listing for someone who would want to become a proffessional level games programmer. This list isn't comprehensive, it eludes to alot of the stuff you should start to learn and expects you to research what areas.