Review: Beginning C++ Through Game Programming by Michael Dawson
I’ll cut to the chase: this book is one of the best introductions I’ve seen to the C++ language. I’ve read probably at least a dozen C++ books and I would say this would be the best place to start if you’ve never used C++ or even as your first programming book. There are some great C++ resources out there, but much of the material can be too advanced for a beginner and will probably scare you off before you get anywhere. With Beginning C++ Through Game Programming, Michael Dawson builds your knowledge from the ground up. The explanations are clear and easy to understand and no previous experience is required. You don’t even have to be a gamer to get value here as most of the games explored in the text are simple things like hangman or tic-tac-toe that anyone can understand.
Dawson walks you through 10 chapters, each diving into a different aspect of the C++ language, starting simply and working up to more difficult topics. The chapter breakdown includes: types and variables, branching, loops, the STL, functions, references, pointers, classes, dynamic memory, and object-oriented programming. These topics really are the most fundamental building blocks of C++, and many are applicable to programming in any language. Lots of source code is shown, and the author explains each step along the way with an impressive amount of clarity. Even though I’d consider myself an intermediate to advanced programmer, I still found some things useful in this book, particularly the usage of the const keyword which was always somewhat confusing to me. All the examples are simple command-line programs, so you don’t need any special libraries, just an IDE that can compile C++ code, such as Visual Studio which has a free version on Windows. If you use a different operating system, you can just get whatever free IDE you want for your platform as this book uses all standard C++ code so any compiler should work.
What I have found reading other books is that they may explain concepts well, and even show code, but sometimes either they don’t give enough context on how real usage would look or the examples are so complex as to be confusing for a novice. In this text, the author is clearly aiming to teach beginners and explains everything in concise terms without becoming too complex. In each chapter, there is another full example game shown, which could be typed into a computer and run. I did not actually test any of the code, as I’d rather just learn from reading, but I didn’t find any obvious errors. Each of these games are fairly straight-forward, with apps like guess my number, hangman, madlib, tic-tac-toe, etc. My one complaint is that the final chapter covers a full blackjack game, and this was much more complicated than the previous chapters and may be a bit too advanced. However, it still may be helpful to some to see what a more involved program might look like. While the title of the book is about “game programming” I wouldn’t say you need to be a gamer to gain insight here. Though having some interest or familiarly with games can help, I’d still recommend this book for anyone interested in C++ or just wanting to learn programming in general. The author manages to cover the most key aspects of the language without burdening beginners with the more arcane constructs that will likely confuse you.
Keep in mind, C++ is a beast of a language, and one book will not make you a pro overnight. After reading this title, you will still likely need other resources before you are ready to build your own apps or games. With gaming in particular, you will likely also need to learn how to use libraries, various APIs, etc. and none of that is covered here. So think of this as merely a light introduction, which will build a foundation your can bring to other more complex books. That said, I really can’t imagine a better book for people wanting to get started with programming in C++. This would work as a great first coding book for teenagers or even younger. I’m not sure there is a better beginning C++ book out there, and this is highly recommended.