views:

645

answers:

14
+9  Q: 

C++ for games

Hi

I am a relatively newbie in C++ and worked in the game industry for a few months. I am looking to get back to the industry and understand that one needs to be a very good C++ programmer (mainly bcos of how competitive it is to get into making games). I was wondering if there are really good websites online that would help with that. Basically I am looking for something that would help me MASTER C++ concepts as well as help me be a good coder through programming examples that I can code.

Thanks Bi

+8  A: 

GameDev.net.

In Resources, there is a "For Beginners" section. Read through all of this!

Skilldrick
Good resource and community. Their irc channel is usually interesting.
CiscoIPPhone
+2  A: 

www.gamdev.net is an excellent resource for game programming.

I would also recommend the Game Programming Gems Series.

As far as mastering C++ concepts, who better to learn from than the guy who created C++? He wrote this: C++ Programming Language

Andrew Garrison
in addition to game programming gems, there is the graphic gems series to learn about the underlying algorithms of the engine you use, or if you want to make one.And the gpu gems series to learn how to program the gpu for specific tasks/optimizations.
Emile Vrijdags
+15  A: 

Scott Meyers' books: "Effective C++", "More Effective C++", and "Effective STL" are absolutely essential for you.

Add to that "Modern C++ Design" by Andrei Alexandrescu.

Dima
+1. Honestly, these are the three BEST books on C++ available. Admittedly, in the game industry some of the stuff doesn't apply, but these are essential texts.
rlbond
+4  A: 

I totally recommend Brucke Eckel's: Thinking in C++

You can download for FREE at his webpage.

http://www.mindview.net/Books/TICPP/ThinkingInCPP2e.html

That should help you master C++, from there, you can start reading code from engines, like Ogre3D, that would be a better learning.

Later, you should check out books from GameDev.net, they are really cool. But in my opinion, the articles found in GameDev are outdated.

Veehmot
I'd up you if I hadn't reached my limit today, best way to further develop yourself as a programmer, read other people's code. This can translate into resume development if you contribute to Open Source while doing this.
marr75
Learning by example is a great practice ;)
Veehmot
+1  A: 

You should check out wildmagic at http://www.geometrictools.com/. This is a nice game engine with lots of sample code and related books. I'd highly recommend it as a deep examination of game engines on c++.

kevin42
Having used Wild Magic 1, 2, and 3 for several years, I'm not entirely sure I agree. Those engines are very good at demonstrating the mathematics of the concept in question, but typically exhibit amazingly bad software design and implementation principles.
ChrisV
+1  A: 

I learned C++ (having no previous coding experience) with the following books:

"C++ Without Fear" by Brian Overland

"Sams Teach Yourself C++ in 24 Hours" Fourth Edition

And

"Beginning Game Programming through C++" Second Edition by Jonathan S. Harbour

The first one is very good and ver detailed, if a bit slow to read. The second I use mostly as a reference, the last one is very useful and quick to read, but it uses the phrase "beyond the scope of this book" fairly often.

Keand64
C++ Without Fear is good, but it doesn't go into the STL (at all) and it's chapter on strings focus on cstrings and not the string class std::string. Otherwise, solid choice.
Hooked
I tend to shudder and turn away from any book that claims to teach you something within a defined short amount of time, personally.
David Thornley
I learned from Teach Yourself C++ in 24 Hours too. I still use it as a reference occasionally. I think it's a pretty good introduction, but it has some really, really bad practices in it. Anyone who reads it must immediately follow it with a book on best practices.
rmeador
+2  A: 

One way to get back in and have fun at the same time is to go through Nehe's OpenGL tutorials, or by using higher-level gaming frameworks such as Irrlicht or Ogre3D

m_oLogin
+6  A: 

C++ FAQ Lite is good. You can learn a lot from that website and there is also a related book which is also good.

The books by Scott Meyers contain very good specific advice too.

markh44
The C++ FAQ Lite really is a great source for insights into C++ programming
ziggystar
+8  A: 

Someone once said that it takes 10 years to learn C++. Having 14 years of C++ experience and still regularly learning new things, I'd say it's true. I would hesitate to call myself a C++ expert even after my considerable experience. Don't expect to master it overnight... you will go through many phases where you think you get it, then you'll discover a whole new world (for lack of a better term; I believe Richard Dawkins refers to this process as "conciousness raising"). I've come to accept that another one of these epiphanies is always ahead of me, hence why I'm not calling myself an expert.

That said, you must practice practice practice. I'll 2nd (or 3rd, or 4th, whatever we're at now) Gamedev.net. I spent a lot of time there back in the day...

rmeador
Oh yeah. Every time you think you know it all, along comes a new bug. Once you figure that out, you realize how screwed up you used to be. This process continues indefinitely. :)
Zan Lynx
+1, I didn't get stl before learning haskell first. :D
abababa22
If it takes you ten years to learn c++ I think there's a problem...
A: 

The above are good suggestions for learning C++ and games...

I will give you a recommendation for software if you just want to make games without a lot of programming background...

You could quickly make simple games and then learn the C++ and other languages it really takes to make serious games...

Software:

Gamemaker

http://www.yoyogames.com/make

The Games Factory 2

http://www.clickteam.com/eng/tgf2.php

Books

Picture Yourself Creating Video Games, 1st Edition

Awesome Game Creation: No Programming Required, 3rd Edition

Make Amazing Games in Minutes, 1st Edition

Good luck to you...

iwanttoprogram
+4  A: 

C++ is a great language and I love it. It builds ridiculously fast code. With good use of profilers, profile driven optimizers, intermodule optimizers, const and restrict keywords, MMX/SSE/vector intrinsics and other stuff it can build ludicrously fast code.

You probably have your eye on job listings from the bigger game companies and there is a lot of C++ demand.

That said, it isn't the only way to develop games. I just want to present some alternatives.

Microsoft's .NET stuff works pretty well. Check out their XNA platform.

You can also write awesome games even in Java. There is a Java version of Quake2 that can get 1,000 FPS in some areas on my Core I7 system at home. Most of the heavy work is in the OpenGL and graphics drivers of course.

Tons of people are writing fun games in Flash, which has language performance much worse than Java or .NET.

Zan Lynx
A: 

I'd recommend starting with the basics:

The C programming language, by Kernigan and Ritchie. With this book you'll be closer to C's internals than with others. Then you can go with C++ books.

nairdaen
+1  A: 

The C++ Programming Language by Bjarne Stroustrup.

I use this to this day. It contains succinct descriptions of all the features of the C++ language. When I search on the web for this information, it's flourished beyond clear understanding. Bjarne did a really good job of clearly defining all the principles of the language, and it's a must-have. I haven't read the whole book, but I've read sub-sections.

(Also gave a vote up for Effective C++, Effective STL, and Exceptional C++ (Sutter))

Kieveli
A: 

It seems that nobody has yet reccomended C++ FQA Lite. FQA stands for "frequently questioned answers". This FQA is called "lite" because it questions the answers found in C++ FAQ Lite.

For me C++ FQA Lite is really an eye-opener on C++.

Mikhail
Why downvoting?
Mikhail