Code of Honor

codeofhonor.com · Personal blog · on HN since 2012

Patrick Wyatt, a Blizzard and ArenaNet veteran, writes about making Warcraft, StarCraft, and Guild Wars, including bugs and netcode.

What HN saysCommenters call it a gold mine of first-hand game development accounts and recommend the StarCraft and 'Whose bug is this anyway' posts.
91HN people shared it
59linked it in comments
43stories submitted
2.6Kstory points
5 months agolast shared
2012people per year2026

Most-shared posts

  1. 1
    Tough times on the road to Starcraft
    27 people · 742 points · first shared 2012 · 112 comments on HN
  2. 2
    The StarCraft path-finding hack
    16 people · 258 points · first shared 2013 · 85 comments on HN
  3. 3
    Whose bug is this anyway?
    12 people · 288 points · first shared 2012 · 42 comments on HN
  4. 4
    StarCraft: Orcs in space go down in flames
    11 people · 439 points · first shared 2012 · 87 comments on HN
  5. 5
    Avoiding game crashes related to linked lists
    9 people · 168 points · first shared 2012 · 58 comments on HN
  6. 6
  7. 7
    The making of Warcraft part 3 - Code Of Honor
    6 people · 41 points · first shared 2012 · 3 comments on HN
  8. 8
    Scaling Guild Wars for massive concurrency
    4 people · 85 points · first shared 2012 · 19 comments on HN
  9. 9
    The Making of Warcraft, Part 2
    3 people · 213 points · first shared 2012 · 14 comments on HN
  10. 10
    Blog
    3 people · first shared 2016
  11. 11
    Marketing Yourself as a Programmer
    2 people · 17 points · first shared 2012 · discussion on HN
  12. 12
    Homepage
    2 people · first shared 2025
  13. 13
    Git multi hook
    2 people · first shared 2026
  14. 14
    Warcraft
    2 people · first shared 2012
  15. 15
    Uh-oh: was the company site hacked?
    1 people · 9 points · first shared 2013 · discussion on HN

What HN people wrote when they linked it

boneitis · 2025-12-10
This is probably the best time as any I'll ever get to mention that Patrick Wyatt's[0] blog[1] is a gold mine of frontline, boots-on-the-ground accounts of making WarCraft II and other games. [0]: https://en.wikipedia.org/wiki/Patrick_Wyatt [1]: https://www.codeofhonor.com/
netcoyote · 2026-04-13
I added browser automation capabilities to sandvault [0], a MacOS sandbox, to allow AI agents to control Chrome browser from within the sandbox, which makes coding & testing websites from within the sandbox much easier. I'm using sandvault+Claude to rebuild my personal blog, Code of Honor [1], because I got tired of WordPress. The site includes search functionality, and articles are automatically syndicated to Mastadon, BlueSky, and Twitter. I wrote a Claude skill to automate testing of iOS apps [2], and it found issues in one of my released apps [3]. [0]: https://github.com/webcoyote/sandvault [1]: https://www.codeofhonor.com [2]: https://github.com/webcoyote/AppTestCircuit [3]: https://www.codeofhonor.com/blog/finding-bugs-with-an-automated-ai-tes…
magnat · 2024-07-07
I strongly recommend reading Pat Wyatt's blog [1] for some insights about an early Starcraft development from more technical point of view. [1] https://www.codeofhonor.com/blog/tough-times-on-the-road-to-starcraft
andai · 2023-10-21
See also: Patrick Wyatt interviewed by Casey Muratori at HandmadeCon: https://youtu.be/1faaOrtHJ-A He was the 2nd employee at Blizzard, did the netcode for their games and also for Guild Wars. His blog is great https://www.codeofhonor.com/blog/tough-times-on-the-road-to-starcraft
TonyTrapp · 2022-08-25
Another classic blog post on this topic that I like coming back to: https://www.codeofhonor.com/blog/whose-bug-is-this-anyway - specifically the "Your computer is broken" section. Apparently Guild Wars ran some computations in the background with a known result, and if those computations didn't yield the correct result, the game would inform the user about a potential hardware fault.
chongli · 2020-02-22
They certainly used linked lists all over the place in StarCraft, WarCraft, and Diablo [1]. I don't know that many game developers would use complicated data structures like the one you've described here. Linked lists are fantastic for insertion/removal in arbitrary places. Game development is not really about showing off with cutting-edge CS research, it's about getting things done. Maybe your arenas with generational indices would be better, but they could take a long time to figure out and lead to a big mess that doesn't go anywhere. [1] https://www.codeofhonor.com/blog/tough-times-on-the-road-to-starcraft
shoo · 2019-08-11
Some great anecdotes here about the development of pathfinding in starcraft 1: https://www.codeofhonor.com/blog/the-starcraft-path-finding-hack > But the biggest thing holding back StarCraft was unit path-finding. > It wasn’t that the path-finding was totally broken; in most cases it worked quite well. But there were enough edge-cases that the game was un-shippable. > Game units would get stuck and stop on the battlefield. Often they would go through elaborate efforts to find paths, inching forward or looping around but not making progress, and sometimes getting wedged and unable to move further. Entire task forces would get bogged down in what looked like the afternoon commute. previous HN discussion: https://news.ycombinator.com/item?id=5252003
arnioxux · 2017-08-09
Are there any known arbitrary code injection for starcraft? Like how you can use a regular controller to reprogram super mario world to play pong? https://www.reddit.com/r/programming/comments/1v5mqg/using_bugs_in_sup… https://bulbapedia.bulbagarden.net/wiki/Arbitrary_code_execution Is this how we are going to accidentally let AGI loose into the world!? /s On a more realistic note I think this will degenerate into a game of who can fuzz test for the best game breaking glitch. Think of all the programming bugs that turned into game mechanics in BW that we haven't discovered for SC2 yet: http://www.codeofhonor.com/blog/the-starcraft-path-finding-hack
douche · 2016-01-26
Great book. I wish there was more literature in this vein. Some other fun reads from the Blizzard team at http://www.codeofhonor.com/blog/
barbs · 2015-01-09
Also worth reading is the three-part article by Patrick Wyatt on the issues encountered whilst developing Starcraft[1], which were a huge factor in its delayed release. Of particular interest is the path-finding hack they used [2] [1] http://www.codeofhonor.com/blog/tough-times-on-the-road-to-starcraft [2] http://www.codeofhonor.com/blog/the-starcraft-path-finding-hack
SamReidHughes · 2014-12-25
I'm not sure if that would work, because computing the offset of list1_elem could depend on the template instantiation of list1_elem because that could (ostensibly) affect the alignment. But you can drop the template altogether on the list element type and put the offsetof expression in the list type declaration. An example of that is linked by some other comment in this thread: http://www.codeofhonor.com/blog/avoiding-game-crashes-related-to-linke… The base class option is, I think, best only for the case where you have only one kind of list you want the object to be part of. Also your pointer should be cast to char before you do offsetof arithmetic on it.
chillacy · 2014-08-08
Patrick Wyatt (worked at blizzard on WC, starcraft, battle.net, then on guild wars) blogged a bit about the design of some of these games: http://www.codeofhonor.com/blog/scaling-guild-wars-for-massive-concurr… Worth a read
jrabone · 2014-04-15
https://www.codeofhonor.com/blog/the-starcraft-path-finding-hack is a great article on the woes of path finding even when given a good basic algorithm. Nice contrast of theory and practice.
cbsmith · 2013-09-18
> And when I open some C-based project's code the first thing I usually expect and see is some homegrown linked list and/or map implementations (of SIGSEGV fame). I know, there are tons of libraries that offer them, but in my experience of "hey, that server crashed, could you figure out what went wrong"-type tasks, they're very rarely used. Fortunately, C++ developers just always use the STL because it is considered the bastion of all that is good in collection classes: http://www.codeofhonor.com/blog/avoiding-game-crashes-related-to-linke… http://engineering.adap.tv/2012/03/29/why-we-use-c-without-using-stl-o… Don't get me wrong. I love C++ and use the STL by default, but it's all too rare that I look at a decent sized C++ project and see anything different from what you'd expect if the project were written in C.
Auguste · 2012-10-12
I read this book around a year ago, and it's one of my favourites. If you've been enjoying the recent Warcraft[1] and Starcraft[2] blog posts from Patrick Wyatt, you'll love Masters of Doom. It doesn't focus on the technical details as much, but it's an excellent story. [1] http://www.codeofhonor.com/blog/tag/warcraft [2] http://www.codeofhonor.com/blog/tag/starcraft
Tomis02 · 2017-07-23
My point was you didn't establish a causation anywhere. We have lots of software written in OOP, yes, but you didn't (and can't, really) prove that it wouldn't have been written without OOP. There are and have been APIs that work just fine without OOP, so it doesn't seem like not having OOP was barrier to entry. FFmpeg is doing fine without OOP, by the way, and so is Linux. Here is how I can read the last few decades - software started becoming more and more popular, and in the beginning of the 90s people jumped on the OO hype/bandwagon (and haven't let go ever since). Now, OOP done wrong was worse than procedural done wrong, but since the hype and koolaid were so strong, and the fast-growing market really needed the software, programmers have just plowed through, DESPITE OOP. Classic Starcraft story, jump to "Game engine architecture" - http://www.codeofhonor.com/blog/tough-times-on-the-road-to-starcraft . My point being, you can release software even when you get held back by OOP. Another thing that you failed to do is comprehend my message. Of course we have a lot of OO frameworks, since OOP is the most popular programming paradigm. If functional were the most popular then you would have a lot of FP frameworks. You're using argumentum ad populum, basically.
danso · 2013-03-22
So few Mac games make it down the transom that I do take note when they show up on Steam's list. Ultratron was one of them, though I didn't buy it because it didn't seem like something I'd be into. Whether or not the game deserves to be a blockbuster, it indeed stinks when hard-working developers don't have much of a net or runway to finally craft the next big indie hit. That said, there still seems to be opportunities to break out for developers of all sizes. Recent success stories that come to mind: * Faster than Light, a space sim just made for Star Trek fans...it reached $200K on Kickstarter -- 2000% of what they had initially asked for -- and it still seems to be selling well. I just bought it last week and it has ruined my free time (http://www.ftlgame.com/) * Block Fortress - a ingenious mishmash of MineCraft, first person shooters, and tower defense. These developers (apparently, four brothers) also made the great Heroes and Castles, a first person tower defense game. And both of these games are dirt cheap with totally reasonable/optional IAP: http://foursakenmedia.com/ * Ridiculous Fishing - a casual iOS game made by some all-stars of iOS development, including Vlambeer and the guy (Zach Gage) who did the awesome SpellTower, one of the iOS games I've played the longest: http://www.ridiculousfishing.com/ * 10000000 - A match-3 dungeon game for the iOS that the creator made in his spare time as a labor of love...it caught fire when a TouchArcade editor discovered…
keybored · 2026-06-09
> - git-multi-hook https://www.codeofhonor.com/projects/git-multi-hook/ git only allows one script per hook event; this is a dispatcher that discovers and runs every script in a hooks dir, in parallel, for both global and repo hooks. Newest Git supports hook events.
mobilio · 2026-03-06
masom · 2025-12-10
What you are looking at is corporate environments; the studios of the past (Ex: Westwood and Blizzard) had a small headcounts, and people were direct decision makers. The story of Starcraft 1 is quite interesting as the devs copied the Warcraft 2 code and began changing it quickly[1](https://www.codeofhonor.com/blog/tough-times-on-the-road-to-starcraft)… > StarCraft was originally envisioned as a game with modest goals that could fit into a one-year development cycle so that it could be released for Christmas, 1996 > Warcraft II had only six core programmers and two support programmers; that was too few for the larger scope of StarCraft, No boardrooms of PMs, and Directors, and VPs, and execs, chiming in every decision, leading to fast turnarounds.
ferguess_k · 2025-07-19
I don't disagree, but usually there are some interesting technical problems, e.g. for Starcraft: https://www.codeofhonor.com/blog/tough-times-on-the-road-to-starcraft
bitwize · 2025-05-08
Simple inheritance makes the class hierarchy complicated through issues like the diamond inheritance problem, which C++ resolves in typical C++ fashion: attempt to satisfy everybody, actually satisfy nobody. The designers of StarCraft ran into the pitfalls of designing a sensible inheritance hierarchy, as described here (C-f "Game engine architecture"): https://www.codeofhonor.com/blog/tough-times-on-the-road-to-starcraft
torginus · 2025-04-14
I remember reading an article about this technique - it was used in the original Starcraft. The idea here, is that the object needs to be allocated anyway by someone else, so you get the linked list for free. An object can also be part of multiple lists, each used by a different subsystem with its own concerns. Deleting an item involves unlinking it from all lists (though that requires a doubly-linked list) Edit: found the article https://www.codeofhonor.com/blog/tough-times-on-the-road-to-starcraft
adastral · 2024-07-07
From https://www.codeofhonor.com/blog/the-starcraft-path-finding-hack > whenever harvesters are on their way to get minerals, or when they’re on the way back carrying those minerals, they ignore collisions with other units Maybe that's part of the fluid behaviour you noticed. The blog contains more technical posts about StarCraft 2, so you might find that "special sauce" somewhere else in there :)
danbolt · 2023-04-26
I think that's a big element of this. The sort of quality bar we see in StarCraft or WarCraft III would come across as kit-bashing or stylized low-budget indie today. Shipping a AAA-style game in a timely fashion needs a larger production process than earlier works. The sort of issues around engineering and linked-lists[1] in the original StarCraft wouldn't really be an issue today. Teams are operating in a very different way. [1] https://www.codeofhonor.com/blog/tough-times-on-the-road-to-starcraft
skocznymroczny · 2023-01-16

Keyboard shortcuts

/Search
j kNext / previous blog
EnterOpen selected blog
vVisit the blog site
fFollow / unfollow
lSwitch grid / list view
dSwitch dark mode
g hHome
g pTop posts
g tTopics
g fFollowing
g lLiked
g yHistory
g qFAQ
EscBack / close