hai, i was wondering if you guys had any advice on getting into game programming with c++
i have a pretty basic understanding of the language and was trying to find out how to do this kind of stuff
but so far i havnt been able to find out much. im just looking for someone to point me in the right direction(tell me what stuff i need besides just a compiler etc) and how to use it

thanks:)

Hi,
There are really only two major options: OpenGL and Direct3D. I'm pretty sure most people get started with OpenGL still. If you want to give that a try your best bet is to get Visual Studio Express 2010 if you don't have VS yet, then go to this website for help on how to setup opengl: http://www.cs.uiowa.edu/~cwyman/classes/common/howto/winGLUT.html

As for how to use it, there's really too much to explain in a forum. Your best bet is to read a tutorial and experiment with sample programs.

I'm assuming you mean a graphical game (like 2D or 3D) because otherwise there is really nothing else you need besides a compiler and reasonable knowledge of C++.

For either 2D or 3D, I find that OpenGL is a good place to start and the NeHe tutorials are really easy to follow and get you to do nice things quickly. For 2D only, just simple SDL can also be quite easy (don't know any particular tutorial to recommend).

For making a GUI-based game (i.e. traditional windows-like applications), then it is just a matter of picking the right GUI tool and library. Generally people seem to like Qt or wxWidget, because they are easy, free and cross-platform (windows, linux, mac, and many mobile phone or microOS platforms).

Other than that, basically, game programming requires good knowledge of object-oriented programming in C++. In other words, I would not recommend you start programming computer games without being quite comfortable with the object-oriented approach, because it will be very difficult and time-consuming if you have more of a C-style approach to doing C++ as opposed to making good use of polymorphism and abstraction.

Other than that, there are a few helper libraries that you can get open-source and will surely save you some time along the way, just browse for what you need on sourceforge and you should find it. Of course, learn to use the C++ Standard Template Library (STL) as much as possible, it is the simple first step into generic programming (i.e. if your code looks too C-ish (lots of C-style arrays and strings, or unsafe type-casting), it's a bad sign). Boost libraries also contain loads of useful stuff (notably: smart pointers, serialization (or marshaling) and multi-threading. which are all central in game programming and OOP), but boost also is generally for a more advanced audience (lots of generic programming and template meta-programming in there). I also recommend OpenAL for audio functions.

Finally, if you are talking about 3D gaming, make sure you have a decent basis in mathematics and geometry. People often neglect that aspect, but you cannot be effective at 3D graphics without being proficient with the mathematics it requires (including 3D rotations, kinematics, calculus, projective geometry, etc.). And for that, look at sites like mathworld.com that are made by real mathematicians: there is a lot of bad resources from people who have tried, and probably succeeded, to program 3D graphic games without proper knowledge of math and it looks pathetic and awkward when they try to explain it.

Nice said mike.... Really valuable information

thanks man, that will really help a ton.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.