Monday, March 17, 2008

Book Recommendations, C++

The vast majority of commercial games developed today are written primarily in C++. While many games will use a scripting language for some game logic and other languages like Python and C# are often used for tools and in build and asset pipelines, the bulk of engine and game code is usually developed in C++. This means that an in depth knowledge of C++ is essential for any programmer wanting to work in the games industry. There are many good books on C++ on the market but this post lists the books I think are most useful for a game programmer wanting to improve their C++ knowledge.

Effective C++ and More Effective C++

Effective C++ and More Effective C++ by Scott Meyers are common fixtures in C++ book recommendations and with good reason. C++ has many gotchas to trip up the unwary and these two books highlight most of them and explain in a clear, concise and readable manner what the best practice is. If you want to avoid learning the hard way what some of the most common C++ mistakes are then you should read these two books.





C++ Common Knowledge

C++ Common Knowledge by Stephen Dewhurst covers similar material to the Effective C++ books but is worth reading in addition to those books because it offers an alternative presentation of some of the issues and some useful new advice.



C++ Coding Standards

C++ Coding Standards by Herb Sutter and Andrei Alexandrescu lays out a large number of recommendations for best practices when developing software using C++. It's a great basis for a coding standard for any project or team and even if your project already has a coding standard it contains enough useful information to be worth reading for any C++ developer. I have two copies of this so I always have a copy in reach at work and at home.



Effective STL

Effective STL is another addition to the Effective series by Scott Meyers and covers pitfalls and best practices when using the STL. The use of STL in games is still a matter of some debate in the industry and many teams, particularly those targeting consoles, do not allow the use of the STL in game code. Personally I think the STL has a place in game development provided programmers understand it and avoid common pitfalls. Much of the bad press the STL gets comes from bad usage by programmers who don't understand it very well. Read this book and avoid being one of those programmers who gives the STL a bad name.



The Design and Evolution of C++

In The Design and Evolution of C++ Bjarne Stroustrup, the creator of C++, talks about the history of the language and the thought processes and reasoning behind many of the features and design decisions that shaped the language we know today. If you've ever wondered why a particular aspect of C++ works the way it does, or wished part of the language was different, you'll probably find a well thought out explanation and justification here. Even design decisions that in retrospect seem like they might have been flawed usually had good reasons when they were made. Understanding the history and philosophy behind the language helps to gain a better understanding of the language as a whole and in addition the book is an interesting read in and of itself as a case study in software design.



Modern C++ Design

While I wouldn't necessarily recommend applying many of the coding techniques presented in Modern C++ Design by Andrei Alexandrescu in a production code base, I would recommend reading the book. I found it an interesting read and quite an eye opening experience as an insight into just how powerful and flexible (and potentially terrifying!) the C++ template system really is. Read it to understand some of the techniques of template meta programming, even if once you understand them you decide they're best avoided in most production code.

0 Comments:

Post a Comment

<< Home