Updates

Latest Tweet



What's New?

Check out for latest innovation, a computer based training video collection


Like this Page

Game Programming Gems Review by Andrew Pape

Great game programming book!

The book is comprised of five sections, each containing many short articles, usually written by different authors, and each article contains references. The book assumes that you are familiar with c++, or c at the minimum, and the examples are all written in these languages. Also, the graphics library supported by the book is OpenGL, not DirectX. If you are new to c or c++ and haven't done any game programming, then this book will be too advanced for you. The code is suitable for both Windows and Linux platforms.

The first section of the book discusses object-oriented design and often refers to "design patterns". Since I hadn't heard of them, and programmed my own way, there was much to learn. This is where the book's references help. If you aren't an expert at c++ programming, I suggest you read the references, namely "Effective c++", "More Effective c++" (both by Scott Meyers), and also the book on design patterns mentioned: "Design Patterns" by Gamma et. al. To make the most of the STL section, you could do with a book on STL also.

The chapter on bit-arrays is especially good for compression and decompression code, preventing you from having to perform tricky bit operations. The profiling section is good because it shows how to profile with your own code, rather than relying on having a compiler to profile for you. That's just two example chapters in this section.

The second section of the book is about Maths. To me, the articles are too complex given how short they are. To understand them, you need university-level Maths and understand summing notation, vectors, matrices, differentiation, and integrals. I've only done First Year university Maths, and found myself out of my depth in this section.

The third section is about Artificial Intelligence. This section covers finite state machines (useful in any game), game trees (used by the computer opponent to defeat the human player in games such as chess and checkers), as well as search techniques, how to make enemies flock, and fuzzy logic.

The fourth section is about polygonal techniques, which are mainly used for 3D games. The book's code for 3D games is written with OpenGL in mind. I am mostly interested in 2D game design, so I haven't read all the chapters of this section. But there's an interesting chapter that shows you how to generate smooth curves given a set of control points. This is great for making an enemy move along a curve rather than in a straight line, so you can apply it to 2D game design.

The final section has a chapter on using 3D hardware for 2D sprite effects (with OpenGL). This is exactly what I needed to know. It was my favourite article because it solved my immediate problem, the answer to which I couldn't find after exhaustive web searches. This book isn't just for 3D game creation; it shows how to use OpenGL for 2D games. This way you can get the benefits of sprite scaling and rotation in a 2D game.

The accompanying CD has the full source code to the articles, which is required because many chapters only contain code snippets with the text.

Overall, this is a great book. It is big and comprehensive. It's better than a single-author book because you're not stuck in his particular mindset. Plus you can pick up the book and quickly read a chapter, and it's usually not necessary to read the chapters in order. The disadvantage is that some of the chapters may not interest you, but there's plenty that will interest you, as the book has a large number of articles, and the book size is 600 pages. The book is well-balanced in that it doesn't contain too much theory, nor too little, and it contains practical examples and utilities that you can readily use.

Anyone with c++ knowledge and an interest in programming games should buy this book. If your c++ skills aren't too sharp, you will want to buy some of the referenced books.

I look forward to reading the other books in the series.