“The following resources proved useful:”
Robert Nystrom 写的设计模式书,把常见模式放到游戏开发的背景下讲,涵盖命令、观察者、状态、游戏循环、组件等内容,示例用 C++。文字清楚简洁,还带有作者自己的口吻。和经典的《设计模式》相比,它更现代,也更偏重在游戏里会遇到的实际问题,其中许多章节对非游戏开发者同样有用。
HN 上的人推荐它,是因为写得清楚、有趣,而且内容超出游戏范围,适合想学软件设计与模式的人;常被当作《设计模式》的现代补充,也被引用来解释组合优于继承。
做游戏或想提升代码设计的程序员
怎么读
由 Claude 根据这本书和 HN 上的说法整理,可能有错- 1先读开头对设计模式的介绍,再挑自己感兴趣的模式章节读
- 2游戏循环、组件、状态这几章最值得先读
- 3每章先想一下自己项目里是否遇到过这个问题,再看书里的解法
- 4可以和自己的小游戏项目配合着读
HN 书评
推荐在前,同类按时间 · 每本最多保留 20 条,统计用全部提及 · 作者本人贴的不算“I'm going to jump on the bandwagon and say that these are very well written - clear and concise, but they still retain authorial voice, and the examples work as intended.”
“I think his Game Programming Patterns book is great: Game Programming Patterns”
“at a glance this[1] article seems pretty good. And is basically this idea.”
“Folks who enjoyed this article might also like the book Game Programming Patterns: Game Programming Patterns”
“Here's a lengthy article that explains it way better (IMHO): Game Programming Patterns”
看全部 20 条 →
“Bob Nystrom's Game Programming Patterns is an engaging, informative book about design patterns that are commonly used in games but are relevant to non-game software too.”
“Thanks for your book by the way! I loved it.”
“I know this site was written specifically for game programming patterns:”
“check out his book on Game Programming Patterns. Great read of software design and patterns (not only for game developers).”
“Game Programming Patterns looks like an excellent book for me to read in order to try to not make some really stupid mistakes in basic architecture when starting out.”
“If design patterns are comfortable and understandable for you then check out Game Programming Patterns[0]. It's a decent book.”
“the Game Programming Patterns[0] website is a great read. I bought the book, but all content is available on the site.”
“If you want a little more reading this is a nice example of an application of reification [0].”
“Bob Nystrom wrote a very good chapter on composition in his Game Programming Patterns book [1] and is worth reading if you want to program in the OO paradigm.”
“It's full of interesting lessons and patterns and deals with coupling and state management. It won't have the answers to copy and paste, but it gives you a lot of food for thought and it's really well written.”
“I really enjoyed Game Programming Patterns and I've been looking forward for this book since I saw the link on munificent's homepage”
“HN's own @munificent wrote a book discussing the most important design patterns in game design. Good book applicable beyond games.”
“Having read Design Patterns in the past, I found Game Programming Patterns to be a really good modern follow-up, though it's targeted at game developers in particular.”
“Bob wrote (the very excellent!) Game Programming Patterns [0].”