In order to be successful at creating any decent game you're going to need the following in your toolbox:
1. What do I need to make games such as Tetris, Pac-man, space invaders |
A. Thorough knowledge of C++ and be intimately familiar with pointers and data structures.
B. A graphics API: SDL for 2d, OpenGL for 3d, both APIs are written in C/C++. You can also look into Ogre3d which is pure C++. There are also other APIs such as Allegro and DarkGDK, but SDL and OpenGL are the standards and of course you have Microsoft's Direct3d.
C. Some linear algebra, geometry, calculus depending on the type of game and whether or not the APIs you use can handle most of the details for you, for example, physics.
D. A scripting language: The popular ones are Python and Lua, however Lua is starting to shine more due to World of Warcraft's use of the language. You'll need a scripting language at some point to make your life easier...
2. How do I go about making such a game? |
That would take to long to explain, but basically you need to start by undertanding the different components of a game, for example the game engine, logic, views, etc...
3. Does anybody know of any decent books for C++ Game Programming? |
There are many C++ Game Programming books on the market and I probably own every damn one. The problem with these books for new programmers is they all assume you have knowledge of C++, in depth knowledge and typically have an understanding of 3d math. There are a couple of things you can do to start with:
1. You need to understand the design elements. You can't create a successful game without understanding how each component should work together. Once you understand this you shouldn't have any problems. There are several books on the market that cover these details, I can recommend a few newly published items that I've reviewed and are excellent resources for newbies.
2. Learn C++ inside and out and practice as much as possible. What I recommend is that as you learn the language think about how each concept you have learned may solve a problem for a game. For example, think about a games inventory and about how decisions are made in a game. Try and build you're own prototypes of these systems, very small and independent, no graphics yet. People will tell you to start small and make a bunch of text based games, but I completely disagree. It's the individual subsystems of a game that you need to be familiar with. If you practice these systems, when it comes time to work with graphics, you'll just be plugging in API calls to get what you want.
3. Learn a graphics API. I don't recommend jumping into 3d right off. Start with SDL in 2d because eventually you will get to the point where you learn to integrate SDL with OpenGL anyway, so it's a logical starting point.
4. Find your favorite game and attempt to mimic its functionality/logic. This again can be done in the console or in 2d, the point is that you start to understand how a game's problems are solved.
5. Build something: Tetris, Pac-man, space invaders, etc...
There is of course a hell of a lot more to Game/Simulation Programming than stated, but this should get you started. I also recommend you join
http://gamedev.net. A purely game programming website and the forums of whatever API you eventually start to learn.