
“Game Programming Patterns” is now finished - rockybox
http://gameprogrammingpatterns.com/?completed
======
Arjuna
Congratulations, Bob!

He had some interesting comments on his writing process in a previous thread
entitled, "Write Code Every Day." [1]

He also graciously answered some questions I had regarding his writing
workflow, as well as his plans to self-publish a print version of the book.
[2]

[1]
[https://news.ycombinator.com/item?id=7569108](https://news.ycombinator.com/item?id=7569108)

[2]
[https://news.ycombinator.com/item?id=7569660](https://news.ycombinator.com/item?id=7569660)

~~~
munificent
> Congratulations, Bob!

Thanks!

> He also graciously answered some questions I had regarding his writing
> workflow

I've got a long blog post about the whole writing process I'll put up soon.

~~~
joshlegs
this is really cool. thanks for putting this up! design is hard :'(

~~~
munificent
It is, but, like everything, it just takes practice and iteration. Every
design I do gets a little better than the last.

------
pvnick
I remember seeing one of Bob's posts earlier about how he struggled to finish
this. Congratulations to him, I know how difficult it is to complete big
projects (they say there's the first 90%, then when the finish line is in
sight, there's the second 90%). His perseverance is inspiring!

~~~
dudeson
True, always the last 10% consume as much effort as the 90%

~~~
jamesbritt
_" Baseball is 90 percent mental. The other half is physical."_

    
    
       -- Yogi Berra
    

Same math applies to software and book-writing

~~~
jo_
Writing software is 60% understanding the problem, 25% understanding the
tools, 20% understainding requirements, and -5% hacking the solution to make
it fit requirements.

------
Jun8
Looks great! I think it would add greatly if you have a chapter that
illustrates the development of a simple game where many of these ideas are
illustrated.

I teach coding to high-school kids. When I tell them that "We'll be building a
game" attention increases exponentially; unfortunately I know nothing about
how to program anything beyond simple board games, e.g. tictactoe. I can
totally use ideas from your book in my course.

Also, many of the students are also in the school's FIRST Robotics Team. I
noticed that programming the robot and game programming are quite a similar
(at a high level). So this might help with that, too.

Thanks a lot once again, I entered my email and will definitely be following
along.

~~~
bun-neh
You might be interested in StoneSoup, a project a friend of mine developed for
teaching his week long Intro to Video Game Programming for middle school and
high school students. Most of the students have little to no prior programming
experience, and by the end of the week they have several games in Processing
which they can call their own.

[https://github.com/JohnEarnest/StoneSoup](https://github.com/JohnEarnest/StoneSoup)

------
wtallis
Why doesn't the section on double buffering mention triple buffering? Double
buffering is useful but it has a very important limitation: if the consumer is
slower than the producer then the producer can stall while the consumer is
still working, and then the consumer gets stale data for its next iteration.
The extra memory cost of triple buffering is _always_ worth it for gaming,
because none of the ephemeral state data is all that large, and _latency
matters_.

------
forgottenpass
Bob, if you're lurking this thread:

Congrats. Any idea when I'll be able to buy it?

Like the other free-online-first books I've read, I've gotten enough value
from it that I'd like to thank you by paying for it.

~~~
munificent
> Any idea when I'll be able to buy it?

As soon as possible!

Unfortunately, I don't know how long that will be. I'm going to be typesetting
it myself with lots of love using InDesign. I hope the final result will be a
really nice book, but it could take me a while.

Still, I plan to work on it every single day, so maybe it will go quickly.

> I've gotten enough value from it that I'd like to thank you by paying for
> it.

Just a thanks is more than enough, but buying a copy of the print book will be
the best way to throw money at me (short of showing up at my house and making
it rain, I suppose).

~~~
sandGorgon
this is where marketplaces like fiverr.com really prove their value - you
could pay a couple of people 20 bucks each to do a 90% job of typesetting and
you could finish it up later.

YMMV - but you dont have a lot to lose. You could be surprised by the time you
save.

------
TillE
Thanks so much for all of this. It's extremely well put together.

I'm still trying to figure out the optimal way to organize every part of a
Dwarf Fortress-style simulation (but multi-threaded of course), and I feel
like I'm reinventing the wheel somewhat poorly. Component-based design is an
important part of that, but there are still so many hairy problems to solve.

These are problems which most games don't encounter because they're not
complex simulations. And the agent-based simulation literature isn't much of a
help either.

~~~
RobotCaleb
That's an ambitious project you're undertaking. Can you share more?

~~~
TillE
As I said, on a technical level think Dwarf Fortress - but with a bit less
detail and a much larger world (potentially distributed across multiple
servers). I'd like to be able to truly simulate a medieval/fantasy RPG world,
so a player can see logical consequences from their actions.

The same underlying simulation could conceivably be used for a peaceful
economic sim, or a highly strategic military game, or just an RPG with a ton
of depth.

~~~
Noelkd
This is something I have been thinking would be great, Mount and Blade has
been the only game that has come close in my opinion.

Don't really understand how you would stop players just slaying all your
NPC's? Which I think isn't a problem in the whole if it was offline single
player but after playing many online games I just can't see it actually
working online.

Also recreating DF with a lot less detail in real time across multiple servers
seems like a insane technical challenge good luck!

------
DanAndersen
Thank you so much for writing this! As someone working to transition from
webdev and enterprisey CRUD app development to something that, if not gamedev
itself, deals more with simulation and modeling worlds, it's been difficult to
deal with the true change in mindset that's needed. Over the past few weeks
I've had "read a chapter of Game Programming Patterns" as a recurring to-do
item, and it's opened my eyes greatly.

------
mattgreenrocks
I had to force myself to close the window to get back to work. Great job on
the content. I was pleased to see a reference to entity-component systems on
the component page, too.

~~~
platz
I'm not a game programmer, but the movement around ECS is very interesting to
me.

------
nathankleyn
Congratulations Mr Nystrom! I've been reading through each chapter as you
posted them, and I've found your writing style throughly enjoyable and your
ability to describe complex code patterns with ease.

It's really hard to get the motivation to finish such a project, serious kudos
to you; I shall be buying that e-book!

~~~
munificent
You and everyone else who ever posted something nice about the book were the
ones who provided the motivation. I absolutely would not have finished without
that.

------
k__
Does anyone know about such a book/list with game-play patterns?

Most of the time I work with game engines, which already use the patterns
mentioned here. I struggle with stuff like moving entities in specific
directions, collision detection, physics, gravity, etc.

~~~
rcfox
Game Mechanic Explorer[0] covers some of these, with examples and source code.

[0] [http://gamemechanicexplorer.com/](http://gamemechanicexplorer.com/)

------
Chromozon
This is a great read. It goes into detail about the practical application of
design patterns- when to use them, when not to use them, and some gotchas that
are not mentioned in other books. I'd pay for a downloadable PDF version of
this!

------
wenbert
Good choice of font. I can't stand reading long online material with sans-
serif.

~~~
munificent
Yes, it drives me crazy when people use sans serif fonts for body copy. You
need the serifs to help tie the line together!

There are sadly few serif fonts on Google Web Fonts that have consistent
letterforms, good metrics, a nice middle-of-the-road x-height, and good bold
and italics, but Merriweather is quite nice.

------
softbuilder
Congrats to Bob! He's been working on this forever, in public.

~~~
munificent
Over four years!

~~~
chris_wot
You are a legend. Seriously.

------
winter_blue
I've really enjoyed reading your book since I last came across it on HN!
Thanks for writing this! I'd be glad to donate a bit, if you add a donation
option.

------
RevRal
I'll gladly purchase an epub for this, looks wonderful.

------
codecondo
Great work, and thank you from the community.

------
chaghalibaghali
I've been looking for something like this for a long time, game development
still seems like something of a dark art and a lot of the resources I've found
online are either too high-level or too focussed.

Does anyone have a script to package this into an ebook format? I'd love to be
able to read it on my Kindle.

------
pcmccull
Thank you Bob! I've been reading through your book and applying the patterns
to both work (web applications) and my hobby game projects. The way you
describe the patterns, especially the component pattern, made it clear exactly
how to apply it to my projects. This is an awesome resource.

------
joshdance
Exciting to see this finished. I remember his comments in Write Code Every Day
-
[https://news.ycombinator.com/item?id=7569108](https://news.ycombinator.com/item?id=7569108)

Super excited to see that his writing strategy worked and it is released. Nice
work Bob.

------
rambojohnson
love the way this stuff is written. no overloaded jargon. the Command pattern
chapter was amazingly straight-forward and everything else learned was
immediately applicable to a game project I'm refactoring. hard to say that
about many similar books on the subject. bravo! :)

------
Alekanekelo
Thank you very much for this book! As a beginning game developer this was just
what I was looking for. After learning how to do rendering, physics, AI and so
on I was missing how to put it all together in a proper way. This is a great
resource! :)

------
pachydermic
This looks awesome - I have been wishing for a resource exactly like this for
a while now. With my first game under my belt I learned the hard way how
difficult game programming can be. I need some high level advice and this
looks perfect.

Thanks!

------
vuldin
This is a valuable resource, and congrats on completing it! Although I don't
know if it 100% complete... please provide source for the lurchIneffectively()
method mentioned in the Command patter chapter :D .

~~~
munificent
Left as an exercise for the reader!

------
chris_wot
Wow, great work! I'm reading through this - it seems to apply to other
programming fields other than just games programming. Really, really
appreciate this hard work and making it free!

------
dimillian
This is a marvel, I can't thank you enough. I'm a mobile application
developer, and I really wants to make game someday. The introduction is one of
the best I've read.

------
dt3ft
This is pure gold. Well written and informative. Thank you!

------
gboudrias
Congratulations! That's a great achievement, and you finished it much faster
than I thought. As soon as I get it, it's next on my to-read list :)

~~~
munificent
It didn't feel fast to me!

------
badlogic
I don't often login and comment, but i just have to say thanks to Bob. yYou
thought me one or two new ways to think about things :)

------
spacemanmatt
I was hoping it would be about patterns of games, not patterns of programming.
These patterns are not specific to games.

------
exacube
The drawings are cute and immensely helpful. I will pay money for this once
it's in print!

------
z3phyr
Has game development got a target singularity? What would it be? Simulated
Worlds like Matrix?

~~~
jamiltron
Nope. Games are widely varied in their scope and delivery. I am fairly
confident there is no single target.

------
niix
This is great, congrats. I've been wanting to get more into game development.

------
MQ_stack
Cool!Start reading now.

------
varg
Great work!

Looking forward to ponder on it.

------
computerjunkie
Congratulations!

------
tsenkov
Congrats!

