Gwern's Reviews > Game Programming Patterns
Game Programming Patterns
by Robert Nystrom
by Robert Nystrom
(I read the online version.)
This book follows the standard pattern for design pattern books: short chapters on each particular style, with definition, pros & cons, simple pedagogic example, comparisons with other design patterns, and possibly some discussion of real-world implementations & game engines. I haven't heard of any other place where one could find this sort of game-oriented programming design advice, and in that respect, this book is unrivaled.
While far from encyclopedic, the chosen design patterns all seem like reasonable choices for video game programmers: there are some architectural ones like Flyweight & Singleton which everyone needs to know, and then a good helping of high-performance or game-specific patterns (eg. Data Locality/Object Pool/Dirty Bit & Double Buffer/Game Loop/Spatial Partition, respectively), as well as a few fairly exotic patterns which often show up in games but not that many other areas (for example, Byte Code shows up in a lot of games to support modding, but you'll otherwise spot such things only in a few extremely-extensible applications like text editors or programming languages).
The actual chapters are surprisingly brief (from my non-game-programming perspective, anyway), and come across more as unusually long blog posts than meaty book chapters. Nystrom mentions several times he was trying for brevity, but I would say he's taken simplicity to simplemindedness. I would have liked to see more of everything: more examples, more real-world applications, more benchmarks, more comparisons to other languages (especially to higher-level languages like Python/JavaScript/Haskell, which as hardware resources increase, game programmers will increasingly use; us Haskellers say that design patterns are simply flaws in the language, and I'm curious how much of Nystrom's writing is simply due to working around C and Java issues).
The web presentation is in standard 2.0-style: big font, lots of whitespace. Not too bad for reading, although the sidebar notes were annoying since a lot of them would have been better off incorporated into the text or simply axed, and their relation to the text could be very confusing if there were 2 or 3 on the same page. The web presentation also omits a major advantage of being online: comments! I started reading the site solely because I saw one of the chapters submitted to Hacker News & found it interesting. By a quick count, there's 18 relevant discussions on Hacker News and another 37 on Reddit, yet someone reading it has no idea. There were many interesting comments and suggestions in those submissions, why not excerpt the best? Or at least link them at the end of each chapter as a "further reading" or something?
This book follows the standard pattern for design pattern books: short chapters on each particular style, with definition, pros & cons, simple pedagogic example, comparisons with other design patterns, and possibly some discussion of real-world implementations & game engines. I haven't heard of any other place where one could find this sort of game-oriented programming design advice, and in that respect, this book is unrivaled.
While far from encyclopedic, the chosen design patterns all seem like reasonable choices for video game programmers: there are some architectural ones like Flyweight & Singleton which everyone needs to know, and then a good helping of high-performance or game-specific patterns (eg. Data Locality/Object Pool/Dirty Bit & Double Buffer/Game Loop/Spatial Partition, respectively), as well as a few fairly exotic patterns which often show up in games but not that many other areas (for example, Byte Code shows up in a lot of games to support modding, but you'll otherwise spot such things only in a few extremely-extensible applications like text editors or programming languages).
The actual chapters are surprisingly brief (from my non-game-programming perspective, anyway), and come across more as unusually long blog posts than meaty book chapters. Nystrom mentions several times he was trying for brevity, but I would say he's taken simplicity to simplemindedness. I would have liked to see more of everything: more examples, more real-world applications, more benchmarks, more comparisons to other languages (especially to higher-level languages like Python/JavaScript/Haskell, which as hardware resources increase, game programmers will increasingly use; us Haskellers say that design patterns are simply flaws in the language, and I'm curious how much of Nystrom's writing is simply due to working around C and Java issues).
The web presentation is in standard 2.0-style: big font, lots of whitespace. Not too bad for reading, although the sidebar notes were annoying since a lot of them would have been better off incorporated into the text or simply axed, and their relation to the text could be very confusing if there were 2 or 3 on the same page. The web presentation also omits a major advantage of being online: comments! I started reading the site solely because I saw one of the chapters submitted to Hacker News & found it interesting. By a quick count, there's 18 relevant discussions on Hacker News and another 37 on Reddit, yet someone reading it has no idea. There were many interesting comments and suggestions in those submissions, why not excerpt the best? Or at least link them at the end of each chapter as a "further reading" or something?
Sign into Goodreads to see if any of your friends have read
Game Programming Patterns.
Sign In »
Reading Progress
| 05/03/2014 | marked as: | to-read | ||
| 05/05/2014 | marked as: | currently-reading | ||
| 05/18/2014 | marked as: | read | ||
Comments (showing 1-2 of 2) (2 new)
date
newest »
newest »
message 1:
by
Ahmed
(new)
May 19, 2014 06:10AM
Do Haskellers familiar with C++/Java also say this about design patterns (i.e., that they're workarounds to bad language design)?
reply
|
flag
*

