The biggest challenge facing many game programmers is completing their game. Most game projects fizzle out, overwhelmed by the complexity of their own code. Game Programming Patterns tackles that exact problem. Based on years of experience in shipped AAA titles, this book collects proven patterns to untangle and optimize your game, organized as independent recipes so you can pick just the patterns you need.
You will learn how to write a robust game loop, how to organize your entities using components, and take advantage of the CPUs cache to improve your performance. You'll dive deep into how scripting engines encode behavior, how quadtrees and other spatial partitions optimize your engine, and how other classic design patterns can be used in games.
About the Author
Robert Nystrom has programmed professionally for twenty years, about half of which is in games. During his eight years at Electronic Arts, he worked on behemoths like Madden and smaller titles like Henry Hatsworth in the Puzzling Adventure. He's shipped games on the PC, GameCube, PS2, XBox, X360, and DS, but is most proud of the tools and shared libraries he created for others to build on. He loves seeing usable, beautiful code magnify the creative ability of others.
Robert lives with his wife and two daughters in Seattle where you are most likely to find him cooking for his friends and plying them with good beer.
Most helpful customer reviews
104 of 108 people found the following review helpful.
A must-have for any software engineer, game industry or not
By D. Otero
To understand the code and some of the more performance-oriented patterns, you must understand C/C++ pointers and memory model.
This book WILL give you:
- An excellent introduction to good software design and how to think about design issues.
- A great background in the notion of software design "patterns."
- An exploration of some key categories of problem that come up in software, and especially in games.
- A VERY detailed exploration of 19 concrete software patterns that are particularly useful in the hairiest parts of game programming.
This book will NOT:
- Teach you how to program.
- Give you specifics of working with a particular library, language, game engine, or platform.
- Give you a 100% complete architectural blueprint for your next game.
This book is a gem, and should certainly be considered required reading for any new industry or hobbyist software engineer, regardless of whether they work on games.
"Game Programming Patterns" delivers, providing an in-depth look at the core engineering patterns used ubiquitously in games but seldom known outside of the games industry. Each pattern gets a full treatment, including everything from background to motivation to concrete examples of where the pattern would apply and where it might go awry. Each chapter also includes a healthy dose of discussion, including going into the trade-offs between each pattern and other possible approaches.
However, at its core, Game Programming Patterns is about much more than games. I find it to be one of the most accessible and most complete books on Software Design in general. The thorough examination of trade-offs and design decisions makes it a fantastic introduction to "good design" for any programmer. I HIGHLY recommend this, especially to new-ish programmers starting off in their first job (again, regardless of whether or not they work on games).
41 of 43 people found the following review helpful.
Unbelievable game-maker spirit animal guide, now in battery-free print form
By Jack Kelly
I must chime in with the others. This book is a fantastic book for programming in general, not just for games. It has a crystal clear look at how to be the benevolent architect of a very complicated piece of software without getting lost in exactly how your particular language does something. The code samples are technically C++, but are written so cleanly and stripped of all unnecessary parts that it feels like pseudo-code.
Also, you can read the whole thing online right now. It's funny, it's an unbelievable game-maker spirit animal guide, it'll make your code better. Go there, use it, and come back and buy a copy.
I bought the hard copy because I wanted this guy to get something for his incredible effort. Also, it looks pretty, and as he says, "doesn't need batteries". On that note, it's incredibly well typeset and laid out.
I couldn't be happier with the book.
1 of 1 people found the following review helpful.
See all 120 customer reviews...
Incredibly Powerful and Concise Reference
By Matt Jensen
This book is guaranteed to give you an epiphany or two regardless of how experienced you are in software architecture.
Don't let the modest title and price fool you, this book culminates some of the best ideas of the best software and game programming design patterns from dozens of the very best books that span thousands of pages, in a little over three hundred pages of material that is set to make you think about your design and decisions without coddling you or delving into minutiae.
If you care about efficiency and performance in practice in modern systems while retaining beautiful and manageable code, this book is guaranteed to give you valuable insight.
Bob Nystrom writes in a friendly, clear, and concise style that makes important things known while reading in an entertaining fashion that conceals the fact that it's easily one of the most important reference books of our time.
Easily stands next to the original Design Patterns, if not completely overshadowing it.