Game Programming Patterns

· Genever Benning
4.5
219 reviews
Ebook
354
Pages
Eligible

About this ebook

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.

4.5
219 reviews
Alex Barber
March 26, 2018
This is an excellent book documenting design patterns that are very handy in C++ (or similar OOP languages) game engine programming, and I'd recommend it to anybody in the field. That said, the book doesn't cover much in the way of modern C++ (beyond very basic C++11), so I'd recommend reading some literature on that as well. Also, to a very new programmer, this book is likely to give you a complex about CPU prefetch optimization. Don't worry about that until you're up and running.
119 people found this review helpful
Did you find this helpful?
geldonyetich
August 18, 2021
Nystrom's Game Programming Patterns is easily one of the better programming books around. These logic patterns came from his experiences as a professional programmer and are an invaluable shortcut for the rest of us. I could point out that he has not invented these patterns so much as provided a name and discussed the practicality of their use. For example, his "Subclass Sandbox" pattern is basically the inevitable result of object-oriented polymorphism at work. Further, I worry that thinking in patterns may hobble problem-solving creativity, despite the inevitability of these patterns meaning that you would end up reinventing the wheel not to know of them. However, neither of these nitpicks really diminish the usefulness of the book. It has proven core to establishing communication between game developers and will save you a lot of time. Nystrom provides a free online copy to read; buying copies of the book is somewhat a formality to thank him for his efforts.
11 people found this review helpful
Did you find this helpful?
DosMan Dan
March 10, 2022
Excellent book for learning to use design patterns in your game programming. Well written with relevant examples and explanations. The book walks you through the design of a simple game elements and explains how the design patterns could be used to reduce complexity and increase the resuability of code.
Did you find this helpful?

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.

Rate this book

Tell us what you think.

Reading information

Smartphones and tablets
Install the Google Play Books app for Android and iPad/iPhone. It syncs automatically with your account and allows you to read online or offline wherever you are.
Laptops and computers
You can listen to audiobooks purchased on Google Play using your computer's web browser.
eReaders and other devices
To read on e-ink devices like Kobo eReaders, you'll need to download a file and transfer it to your device. Follow the detailed Help Center instructions to transfer the files to supported eReaders.