Top all-time · #291
Robert Nystrom
Personal blog · gameprogrammingpatterns.com · on HN as munificentgamesprogrammingwriting
Robert Nystrom writes Game Programming Patterns, a personal blog at gameprogrammingpatterns.com about games, programming and writing. Since 2009, 168 different Hacker News readers have linked it 226 times, most often “Game Programming Patterns (2014)”. No feed was found, so read it on the site itself.
Often recommended · 23 of 40 sampled comments recommend it?
Why HN links it
HN readers link Nystrom's free book on design patterns in game code, which commenters call well written and useful beyond games, often alongside Design Patterns and Crafting Interpreters.
- Recommended for · 23 comments
- Called a classic, 'really well written', an 'amazing architecture resource', and 'more exciting than the GoF book'.
Summarised by Claude from a sample of 40 HN comments that link here. Each comment is marked recommending, critical or neutral (citing without judging); how this works.
Most-linked posts?
- Game Programming Patterns (2014)39 people · 48 mentions · first linked 2009-10-11
- Game Programming Patterns (2014)19 people · 19 mentions · first linked 2020-01-12
- Game Programming Patterns now available in print and eBook15 people · 17 mentions · first linked 2013-10-29
- Game Programming Patterns14 people · 14 mentions · first linked 2014-11-04
- Data Locality13 people · 14 mentions · first linked 2013-12-09
- Game Programming Patterns – Web Book (2014)10 people · 10 mentions · first linked 2019-10-27
- Game Programming Patterns: Component8 people · 10 mentions · first linked 2011-06-30
- Command design pattern7 people · 8 mentions · first linked 2013-10-17
- A nice introduction to finite state machine 6 people · 6 mentions · first linked 2013-08-03
- Game Loop5 people · 5 mentions · first linked 2015-05-24
What Hacker News says?
I have been reading Game Programming Patterns lately. It explains the design patterns with examples from games, and it is really well written by an engineer at Google (Bob Nystrom): http://gameprogrammingpatterns.com/ After I complete this book, I think I'll read his other book: Crafting Interpreters. This one teaches about implementing a programming language from scratch, once in Java and a second time in C.
Comment linking /
on “Ask HN: What language-agnostic programming books should I read?”Submitted “Game Programming Patterns” is now finished as a story · 988 points
HN discussionI believe these fall under "interpreter pattern": https://en.wikipedia.org/wiki/Interpreter_pattern https://gameprogrammingpatterns.com/bytecode.html https://wiki.c2.com/?InterpreterPattern I first read about it from the "Design Patterns" book, which I would recommend to everyone.
Comment linking /bytecode.html
on “Why SQLite Uses Bytecode”Submitted Game Programming Patterns (2014) as a story · 635 points
HN discussionBuilding a game is a probably the best way to learn and apply state machines since a lot of it is all about how to manage state effectively since there are so many pieces of state and interactions between them. Also, since Bob is too humble to say it - http://gameprogrammingpatterns.com is an amazing architecture resource for programmers in all disciplines, not just gamedevs. He's got another book called http://craf…
Comment linking /
on “How I Learned to Stop Worrying and Love the State Machine”Submitted Game Loop as a story · 393 points
HN discussionI learned about state machines, along with push-down automata and others but these were in a formal automata class where we learned things like the Church-Turing thesis and other similar theory. So there's learning about state machines in that context and then there's learning about state machines by actually building them in complex pieces of software, or replacing spaghetti code with FSMs. That's when I personally…
Comment linking /
on “How I Learned to Stop Worrying and Love the State Machine”Submitted Game Programming Patterns as a story · 271 points
HN discussionI love this series. One little rule I've stumbled onto over the years that this series revolves around is: When I'm stuck on a software design problem, pick some random part of the program and see what happens if I make it first class. In this case, Eric takes the game rules and turns them into objects. (Essentially the Command pattern[1], which is close to my heart[2].) You can go overboard with this, of course, bu…
Comment linking /command.html
on “How I Learned to Stop Worrying and Love the State Machine”Submitted Game Programming Patterns as a story · 265 points
HN discussionHaving read Design Patterns in the past, I found http://gameprogrammingpatterns.com to be a really good modern follow-up, though it's targeted at game developers in particular.
Comment linking /
on “The most mentioned books on Stack Overflow”Submitted Game Programming Patterns: Event Queue (2014) as a story · 264 points
HN discussionAccording to the "Game Loop" chapter, the "intent" of the Game Loop pattern is to "Decouple the progression of game time from user input and processor speed." http://gameprogrammingpatterns.com/game-loop.html The chapter goes on to assert: > Game loops are the quintessential example of a “game programming pattern”. Almost every game has one, no two are exactly alike, and relatively few programs outside of games use…
Comment linking /game-loop.html
on “Game Programming Patterns (2014)”Submitted Speed memory access by arranging data to take advantage of CPU caching as a story · 149 points
HN discussionI think it is difficult to oversell the bob nystrom game patterns book https://gameprogrammingpatterns.com/contents.html
Comment linking /contents.html
on “Patterns.dev”Submitted Game Programming Patterns (2014) as a story · 142 points
HN discussion> Also Bob Nystrum has some other good material on his blog, and a chapter in game programming patterns about PL stuff. Links: https://journal.stuffwithstuff.com/ https://gameprogrammingpatterns.com/bytecode.html
Comment linking /bytecode.html
on “Crafting Interpreters”Submitted Game Programming Patterns: Double Buffer (2014) as a story · 139 points
HN discussionI think this assumption that cross platform UI solutions can’t be extremely fast is a very strange one. There have been some bad efforts at this in the past which is maybe how you arrived at the conclusion but the concept of Flutter is pretty straightforward and not dissimilar to games in some sense where you just need to push pixels to a screen. They even have a some game engineers who used to work at EA on the tea…
Comment linking /
on “Flutter 3”Submitted Game Programming Patterns (2014) as a story · 118 points
HN discussionBob wrote (the very excellent!) Game Programming Patterns [0]. Lots more info in [1], [2], [3] [0] http://gameprogrammingpatterns.com/ [1] http://journal.stuffwithstuff.com/2014/11/20/how-my-book-lau... [2] http://journal.stuffwithstuff.com/2014/11/03/bringing-my-web... [3] http://journal.stuffwithstuff.com/2014/04/22/zero-to-95688-h...
Comment linking /
on “How I Made $70k Self-Publishing a Book about Ruby on Rails”Submitted Game Programming Patterns – Bytecode as a story · 103 points
HN discussionThis is more of a practical writeup on state machines than a theoretical one: http://gameprogrammingpatterns.com/state.html You might also know these as flowcharts when applied to program flow control. I don't think I answered the original question well. I just wanted to point out that math is more than just equations. Others have done a much better job in this thread.
Comment linking /state.html
on “Think in Math, Write in Code”Submitted Game Programming Patterns now available in print and eBook as a story · 53 points
HN discussionSame author wrote Game Programming Patterns: http://gameprogrammingpatterns.com/
Comment linking /
on “Crafting Interpreters: A Review”Submitted Game programming patterns as a story · 38 points
HN discussionIt is not what a relational database does (see another's reply on row-oriented vs column-oriented storage), but you miss the fact that this is fundamental for data locality in an application. See, for example, this article on game design: http://gameprogrammingpatterns.com/data-locality.html
Comment linking /data-locality.html
on ““What next?””Submitted Game Programming Patterns as a story · 37 points
HN discussionI use sidenotes very heavily in my book[1], which is written in Markdown[2]. Instead of putting the contents of the asides in the middle of a paragraph, I pull them out into separate <aside> tags. Inside the paragraph, I have a little <span> with a name to indicate which text the <aside> should be positioned to line up with. There is some CSS to put the asides on the side[3] (with a ton of variations to make it play…
Comment linking /double-buffer.html
on “Tufte CSS”Submitted Game Programming Patterns as a story · 11 points
HN discussion