8 ms·
How I wrote Game Programming Patterns
- lukeholder 13y agoWow, this is the best insight into the struggles of writing a book I have read. I started a book and quit on the first real hurdle. This post really stirred up something in me - about finishing something for the first time in my life. Thanks for sharing.
- hawkharris 13y agoThis was a great post. I enjoyed the book, and it's always interesting to hear about a writer's process. Everyone tackles the big challenge in a different way. The only detail I disagree with is the one about telling your friends and family what you're doing as a way to keep motivated. A few years ago I read a paper about the psychological effects of talking about goals. [0] The takeaway was that, for most people, sharing a goal provides a sense of satisfaction and self-validation. While it is pleasing, the sensation makes us significantly less likely to accomplish goals such as writing books, losing weight, etc. Again, I enjoyed the post very much and don't mean to nitpick. I just think this is another interesting perspective to consider when you're setting out to tackle a big goal. [0] Unfortunately, my memory is failing me, but if anyone knows of the paper - or an article or paper along these lines - please feel free to contribute.
- kandalf 13y agoI saw this paper as well. But I suspect for some people the effects of telling others will be net positive, even if that's not the average. Anecdotally, I believe that to be true for myself.
- lhc- 13y agoI dont have a link, but I know the paper you are referring to (and have found it to be true to my own real life experience). Congrats to the author for using that as motivation to keep up writing.
- eberfreitas 13y agoThis talk from Derek Sivers comes to mind: http://www.ted.com/talks/derek_sivers_keep_your_goals_to_yourself http://www.ted.com/talks/derek_sivers_keep_your_goals_to_you...
- kandalf 13y agoI saw this paper as well. But I suspect for some people the effects of telling others will be net positive, even if that's not the average. Anecdotally, I believe that to be true for myself.
- munificent 13y ago> The only detail I disagree with is the one about telling your friends and family what you're doing as a way to keep motivated. Yeah, I didn't mention this in the post, but it ended up doing nothing for me. I did it because at the time I saw some stuff recommending it, but I don't intend to do this again.
- shabble 13y ago> Unfortunately, my memory is failing me, but if anyone knows of the paper - or an article or paper along these lines - please feel free to contribute I believe it's normally referred to as the "Substitution effect", there's a paper by Gollwitzer et al called "When Intentions go Public"[1] that might be the one you're thinking of? [1] http://www.psych.nyu.edu/gollwitzer/09_Gollwitzer_Sheeran_Seifert_Michalski_When_Intentions_.pdf http://www.psych.nyu.edu/gollwitzer/09_Gollwitzer_Sheeran_Se...
- protonfish 13y agoI had been wondering if writing a book on GitHub in markdown was a legitimate idea or just based on my inexperience with other writing tools. I still don't know, but the author's work has convinced me that's how I want to do my next writing project.
- munificent 13y agoYes, I really loved the workflow I ended up with. Putting it on GitHub has been hugely helpful. I merged four pull requests and closed twenty bugs this morning. How awesome is that?
- protonfish 13y agoIt really is wonderful to work on documents with git and markdown is the perfect pairing of text format. There seems to be a huge opportunity waiting for someone to make a GitHub marketed to non-techie writers.
- gknoy 13y agoI believe Loren already made it: https://www.penflip.com/ https://www.penflip.com/ (Caveat: I've signed up but never used it.)
- bowerbird 13y agoif you already know git (or github), it'll work for books. but i doubt it's the best change-tracking system for them. too much irrelevant crap, and it doesn't cut to the heart of those things that actually need to be done for a book. plus, most writers will never slog through learning github. to make a system that is writer-friendly _and_ does what a book-writing change-tracking system ideally _should_ do, you'd have to hack github so much that -- in the end -- it would have been order-of-magnitude simpler (and better) to program a purpose-built system instead, from scratch. and yes, i told loren this from day one. he didn't believe me then. but if you ask him now, i'll bet he won't be quite so sure. and by the time he's done, i have no doubt he will agree. yes, writers need a version-control system. but no, it is most definitely _not_ github. -bowerbird
- jarrett 13y agoFor anyone wondering about the book itself: It covers a lot of very practical, nuts-and-bolts challenges in structuring a game's codebase. It doesn't succumb to the temptation of architecture astronautics.[1] It's more like, "I'm about to type out a class that handles keyboard input. How should I write it?" For that reason, I found it to be one of the most helpful references on game programming I've yet discovered. [1] http://www.joelonsoftware.com/articles/fog0000000018.html http://www.joelonsoftware.com/articles/fog0000000018.html
- mandlar 13y agoThis was a fantastic read! Congratulations on finishing your book. Ever since John Resig wrote about Write Code Every Day [1], I've fallen into the habit of writing some code on a new side project of mine. Every day, at least 30 minutes of work. Not saving up things to do for the weekend makes it a lot less stressful and has increased my productivity significantly. And whatever I've been working on is constantly on my mind instead of put aside until the weekend or some other period of free time. I'm definitely reaping the benefits of not "breaking the chain." [1] http://ejohn.org/blog/write-code-every-day/ http://ejohn.org/blog/write-code-every-day/
- michael_nielsen 13y agoAwesome post. I'm finishing my third book, and totally recognize the agonizing over whether the book will ever get done! On not using a conventional publisher: my first two books were with mainstream publishers (Cambridge University Press and Princeton University Press). For my third book I decided to self-publish online only, because that makes it possible to integrate animations, interactive Javascript, and so on. Four publishers have asked about publishing paper editions of the book, but it's hard to imagine going back to the printed page as the primary target medium. Having the web as the primary target is so much more powerful.
- jmount 13y agoMichael Nielsen as in "Quantum Computing and Quantum Information"? If so great book.
- michael_nielsen 13y agoThanks!
- mjburgess 13y agoI'm just replying to you so I can say to people that I've replied to you :) Nielsen & Chuang is one of the bibles of my universities physics dept.!
- mailshanx 13y agoHey Micheal, just wanted to let you know i'm very, very keen on reading your DL book! The first two chapters u've put out are great, and i can't wait to read the rest of it :)
- niix 13y agoGreat post and insight. I'm excited to start reading your book.
- n1ghtmare_ 13y agoThis is extremely inspiring. I've been on a streak ever since I read John Resig's post and your comments about your book. I'll be writing code for my side project every day, at least 30 mins. I don't know what it is ... But I'm really freaked out of breaking the chain, it keeps me really motivated. I love it.
- jypepin 13y agoThis book looks really cool and I've always been interested in reading more about game programming. Is there a way to grab this as a pdf instead of only-online content?
- munificent 13y agoNot yet, I'm working on that now.
- jypepin 13y agoawesome thanks for the answer! I subscribe to your ebook mailing list, would be awesome to have a update about the pdf through that funnel!
- munificent 13y ago> I subscribe to your ebook mailing list, would be awesome to have a update about the pdf through that funnel! That's one of the main reasons the list exists. :) The day the books are ready, you'll know.
- omarhegazy 13y agoIf you want, you can run some wget magic to get the whole book's html files (and used css/js files) on your hard drive . wget -r gameprogrammingpatterns.com
- _pmf_ 13y ago> The last game I worked on, Henry Hatsworth in the Puzzling Adventure Ah, you're that guy! I bought HHitPA because I read a reddit post by you (presumably) about it.
- backwardm 13y agoThanks for taking the time to write this post. It was incredibly motivating to me. A weird side effect is that I now have a scanner in my Amazon shopping cart. Once it arrives, I will start a chain where I doodle something every day, scan it and post it online. I am going to read your book so I can learn more about programming patterns in general—I'm not so interested in programming games yet. Reading the first few chapters, I can tell I'm going to learn a lot. Also, you can put your own animal drawing on your cover now—and you get to choose which animal! I'm looking forward to reading new posts about how you need to call your bank every few days to make more room in your account due to all the book sales. Congratulations on getting to done.
- munificent 13y ago> It was incredibly motivating to me. A weird side effect is that I now have a scanner in my Amazon shopping cart. Once it arrives, I will start a chain where I doodle something every day, scan it and post it online. This is awesome! I used to draw (hence the hand-drawn illustrations in the book), but it's one of the many hobbies that didn't make the cut after I had kids. As someone who spends way too much time staring at a screen, there's something really therapeutic about actually working with my hands in an analog medium.
- backwardm 13y agoI started out as a graphic designer as well, then gradually moved into programming. I have four kids (evenly spaced between 2 and 11), so I know how you feel about extra time for fun hobbies like drawing. (we are a few weeks away from our first dog too.) Your post reminded me that I shouldn't be spending all of my time in code working on client projects. Yes, it pays the bills, but I should (need to) do a little drawing each day to keep that part of me alive. It's not as big as writing a book, but it will be fun to see how long I can keep the chain going. I also agree with your comment about screens vs. paper—I have one of those fancy Wacom drawing tablets, but it doesn't come close to the feel of a nice sharp 4H pencil or Pilot v5 pen on copy paper. Thanks again for the inspiration.
- Remnant44 13y agoJust wanted to say nice work. I was browsing GPP the other day and I found it to be a valuable reference, and not just for game programmers. On a different note, welcome to the Pacific Northwest!
- munificent 13y agoThanks! Moving to Seattle was weird: I felt like it was the place I'd always wanted to live even though I barely even knew it existed until a few years ago.
- marvy 13y agoThis is somewhat off-topic, but if the author is still reading these comments: in the chapter on bytecode, it seems that an obvious alternative was overlooked. Don't implement your own little language. Take one that's already there. Lua, Python, JavaScript, there are lots of them! Why not?
- munificent 13y agoI think it mentions Lua and a few others. I think the chapter is equally applicable to those too. It's as much about how to implement your language as it is about how those languages were implemented. (In particular, I learned much of what I know about bytecode VMs from Lua's implementation.)
- marvy 13y agoYes, you mentioned them. But what surprised me is that you never suggested using them, instead of implementing your own. I understand that sometimes implementing your own is the way to go, but surely sometimes it makes sense to just use Lua?
- robomartin 13y agoReading it now. Thanks for sharing. I have a couple of book projects I've been pecking away at for a couple of years. This will help. Please consider changing your site so it can be resized (two finger zoom) when viewed on an iPad. The font is on the border of being small. I often do my reading late at night. When tired I find it easier to make pages fill the screen side-to-side in landscape mode. Thanks.