Recommended Posts

Okay, I pretty much understand the basics of C++ (functions, classes, libraries, etc...) and I know a lot of the basic libraries, but one BIG question came to me not-so-dramatically: "Okay, I know how to do fancy calculations. Now how do I turn what I know into a game?" Any ideas on something I should read or look at (on the internet if it can be found, free would be best, though I can spend SOME money...) to help me out here? I know everything I need to (I think) I just can't figure out how to apply it.

0

Share this post

Link to post

Share on other sites

Hey!If you are starting up, I recommend something simple. Maybe trying to make a text-only game (you don't need to care for graphics), maybe a simple text adventure, you can really get the hang of OO programming with that kind of games. If you are going further maybe network games, like a MUD (Multi User Dungeon). From this point, going into the wild of 2D games is just the matter of the graphics part (and time you have, of course [wink]). Maybe try to program a tetris clone, or something similar. You can get the a lot of information, articles, and tutorials using the key of knowledge (= google). If you are moving on to 3D games, the best book I can recommend is OpenGL Game Programming.Remember: Always complete your games. This is the HARDEST part of game programming. So start very very simple, so you can complete pretty easy. Completing your game is best feeling!

Share this post

Link to post

Share on other sites

C++, like every other programming language, is a means for turning problem solution strategies in your head (architecture, algorithms) into versions that computers can understand and carry out, finally arriving at the solution. Until you can come up with solution strategies, though, you don't know how to program.

The following exercise will solve that:

Take a simplistic game you know very well. Some variant of Space Invaders (R-Type, Ikaruga, Gradius, though the simpler, the better) or Asteroids is ideal.

Decompose the game into all of its component elements. How do the bad guys move? How can you move your ship? How do your bullets and rockets behave?

Derive formal descriptions - solution strategies - for each of the elements above, in such a manner that the computer can recreate them independently.

Now decompose the interactions between objects. How do the bad guys act when hit by your bullets? How does your ship act when hit by the bad guys, or by their rockets? etc.

Derive solution strategies for these interactions, too.

Convert all your solution strategies so far into C++ code.

Congratulations: you're about 30% of the way toward making a complete game. Now figure out audio, video, input, timing and state management, then tweak for balance and you're done.

What? I never said it was an easy exercise. [smile]

0

Share this post

Link to post

Share on other sites

Okay, I know how to do fancy calculations. Now how do I turn what I know into a game?

It's really not that hard to make a game. You could make a game with three lines of code ( 'guess my number' for instance). As already mentioned you should decide what game you want to make and than start working towards accomplishing your goal. Making a fancy game with nice graphics will require a graphics API ( same thing with sound and input). As Oluseyi suggested the best thing would be to start from something simple. Once you have some grasp with basic things, you can jump to a game that has nice graphics, sound etc. If you have C++ at your finger tip, you can skip the first steps and plunge straight in to DirectX or OpenGL.