RSSAmplifier

Blog

Code of Honor

Game design, programming and more

codeofhonor.comRSS feed ↗36 posts

Latest posts

SWAPMEAT is launching June 17

SWAPMEAT is a roguelite third-person shooter, where every alien you harvest gives you new body parts with unique powers, like triple-jump legs, turret-dropping torsos, grenade-launching turkey heads. SWAPMEAT is on Steam , and runs on Windows, Mac, and Steam Deck.

Git is just...

2005: "Git is just a directed acyclic graph." - Linus Torvalds 2009: "Git is just a content-addressable filesystem." - Scott Chacon 2011: "Git is just homeomorphic endofunctors mapping submanifolds of a Hilbert space." - Chi Wai Lau 2026: "Git is a just a confessional booth where you ask an AI to absolve you of your merge conflicts." - Patrick Wyatt

Sandboxing all the way down

I'm not worried about AI taking my job. I'm worried about it taking my SSH keys. There's a malicious package released into the software supply chain every six minutes, so we're all just one download away from having our computers owned, our digital identities stolen, and our files encrypted by ransomware. When you open an AI agent on your local computer, you're handing it…

Migrating away from WordPress

Occasionally I get the urge to write blog articles. But I was unhappy with my website, originally made in WordPress. It needed security updates more frequently than I posted, and that crushed my motivation. I wanted a better alternative. Or perhaps ... maybe ... I could write a new CMS to host the blog? Or write a new programming language to write the CMS? Or write my own operating system to host…

Mike McQuaid on SandVault and git worktrees

Mike McQuaid is the project leader for Homebrew, the package manager for macOS all developers use. He handles more pull-requests from open-source developers than the rest us will ever need to address, and uses AI to manage the workload. The main problem you’ll bump into pretty quickly with agents is: you have to spend half your life going “Yes, do this safe thing”, “No, don’t do this dangerous…

Finding bugs with an automated AI test agent

Every day I'm surprised by how capable AI agents are becoming. Today's surprise was how the agent can build its own test-harness to find bugs. I was reading about MobAI , an online service which tests mobile apps by interacting with them while they're running inside a simulator, like iOS Simulator (part of Xcode). It occurred to me that this would be a straightforward skill to build…

Sandvault browser automation from within a sandbox

Sandvault, a macOS sandbox for AI agents, now supports browser automation, letting you safely interact with web pages: https://github.com/webcoyote/sandvault

No sandbox for your AI agent? Are you crazy?

I make online games and discovered they're a magnet for hackers, and get attacked in proportion to their success. The rewards — joy of discovery, flouting the rules, public recognition of their creds, and monetary rewards — create a steady influx of people looking to misbehave. If you build it they will hack. At the risk of encouraging even more people to join the affray, there's never…

Creating Guardrails for AI Agents

How do you ensure success when collaborating with AI agents? I broke down my go-to techniques at the O'Reilly AI conference last month, and the video + presentation notes are now available. Check it out here: https://www.codeofhonor.com/library/ #LLMs #Coding #AI

Article syndication

If everything worked correctly, my blog articles are now syndicated to Mastadon/Bluesky/X, with reverse syndication links in the comments. Thanks Molly White for your Citation Needed article explaining how to make this work.

Twenty Years of Guild Wars

So many folks have reached out to me to commemorate the 20th anniversary of the launch of Guild Wars on April 28, 2005, that it encouraged me to write this little bitty. I was heartened to see an article about Guild Wars in GameRant , which talked about the server infrastructure of the game, and most notably about its uptime. The article opines that “something about Guild Wars sets it apart from…

Credit where credit is due

Credit where credit is due I feel fortunate to have been part of Blizzard Entertainment when it started, now over thirty years ago. I got to work with amazing people; make games players loved; and learn a lot about design, programming, and business along the way. Some of those lessons were hard-earned, as my blog articles and the book describe. While I’ve blogged about those early years of my…

HandmadeCon 2015 interview transcript

In 2015 I participated in HandmadeCon, a convention created and run by programming guru Casey Muratori about game development. The event included five speakers: Tommy Refenes, Mike Acton, Jonathan Blow, Ron Gilbert, and myself. The event was hosted at the Seattle Public Library, with Casey interviewing each of us in turn about the technology behind the games we developed, the challenges we…

About me

I'm Patrick Wyatt, a lifelong game developer, designer, and player. I live near Seattle Washington, USA, and this is my blog. My game programming includes networking & multiplayer, graphics, user interface, AI, path-finding, sound & music, asset pipelines, build servers, installers, game services, authentication, presence, matchmaking, tournaments, chat, databases, caching, logging, metrics,…

Stay Awhile and Listen

Developing games is a full-time occupation, so it is no surprise that I’ve had less time for blogging as I’ve started creating a new game. After a two-year stint helping other folks publish their games I’m back to coding and game design full-time and having a wonderful time. But for those of you who have enjoyed my blogging about the early years of Blizzard Entertainment and the development of…

Uh-oh: was the company site hacked?

Anyone who runs a web site knows that they’re constantly under attack. You only have to look at your log files to know that hackers running site-scanners are constantly hitting your servers looking for unpatched vulnerabilities to exploit. One of the servers I wrote for Guild Wars 1 — named AcctHttpSrv — was designed to behave like a web server. When you received an email from the Guild Wars…

The StarCraft path-finding hack

Game-unit path-finding is something that most players never notice until it doesn’t work quite right , and then that minor issue becomes a rage-inducing, end-of-the-world problem. During the development of StarCraft there were times when path-finding just didn’t work at all . As the development of StarCraft dragged on it seemed like it would never be done: the game was always two months from…

Whose bug is this anyway?!?

At a certain point in every programmer’s career we each find a bug that seems impossible because the code is right, dammit! So it must be the operating system, the tools or the computer that’s causing the problem. Right?!? Today’s story is about some of those bugs I’ve discovered in my career. This bug is Microsoft’s fault… or not Several months after the launch of Diablo in late 1995, the…

The making of Warcraft part 3

The first-ever multiplayer game of Warcraft was a crushing victory, an abject defeat, and a tie, all at once. Wait, how is that possible? Well, therein lies a tale. This tale grew organically during the writing to include game AI, the economics of the game business, fog of war and more. Read on if you have lots of free time! This is part 3 of the story. Part 1 Part 2 After six months of…

StarCraft: Orcs in space go down in flames

In my previous article about StarCraft I talked about why we rebooted the project and changed it from a follow-on to Warcraft — derisively called “Orcs in space” in 1996 — into the award-winning game that we were finally able to deliver after two more years of hardship. But one noteworthy source of inspiration didn’t make it into my previous article, and that’s what I’m going to write about today.…

Avoiding game crashes related to linked lists

In this post I’m going to talk about linked lists, a seemingly trivial subject that many programmers — even good ones — seem to get terribly wrong! Then I’m going to share techniques (with source code) to make your game engine code simpler, faster, more memory efficient and more reliable. Wow! TL;DR: Here’s the source code which implements an intrusive doubly-linked list that’s better than…

Tough times on the road to Starcraft

I've been writing about the early development of Warcraft, but a recent blog post I read prompted me to start scribbling furiously, and the result is this three-part, twenty-plus page article about the development of StarCraft, along with my thoughts about writing more reliable game code. I’ll be posting the latter parts over the next several days. This post: Why StarCraft crashed frequently…

The making of Warcraft part 2

In my previous article about Warcraft I talked about the beginnings of a series that would come to define Blizzard Entertainment and lead it to being one of the best-known and most-loved game companies in the world. But how did Warcraft go from an idea to a full-fledged game? Let me tell you, it was not a straight-line path from conception to launch. As with many games the design evolved over…

Debugging running server applications

So you've written an awesome online game that works perfectly in the test environment, but when real users are playing the game server doesn’t work properly. Now what?!? I was reading an article by Mike Perham called Debugging with Thread Dumps and wanted to share a related technique from the development of Guild Wars that might help you solve some of those hard-to-find bugs that only show up…

Marketing yourself as a programmer

A number of readers asked questions about programming careers, both about getting into game-development as well as staying employed in software engineering. I started writing a comment to JM about age-discrimination but it turned into this blog post about getting a great software engineering job. JM asked: How did you manage to stay in this business for 22 years? I’ve been coding for 30 years now…

The making of Warcraft part 1

Back before the dawn of time, which is to say when PC games were written for the DOS operating system, I got to work on a game called Warcraft. I get to lead a project! While I had developed several PC games, a couple of Mac games, and seven console titles for the Super Nintendo and Sega Genesis, I was either in a junior role on those projects, or the projects were game “ports” rather than…

Scaling Guild Wars for massive concurrency

TL;DR: Server-side game recording is awesome for performing scalability testing, as well as reproducing game bugs and enabling players to replay their game experiences. How to load-test game servers In anticipation of the launch of Guild Wars 2 in August I thought it would be interesting to talk about some of the techniques we used to ensure that the original game of Guild Wars was capable of…

Detect client disconnects using named pipes in C#

TL;DR: Solved – after several failed attempts I discovered how to detect client disconnects when using named pipes in C# — the article below includes relevant code from my CSNamedPipes GitHub project. In my spare time — of which there’s not much since I have four kids — I’ve been helping someone solve a programming challenge related to inter-process communication between a desktop application and…

Error handling using forever-loop

One of the biggest hassles in programming is handling error conditions. It’s also one of the most important parts to get right because improperly handled errors lead to security defects and general unhappiness of your users. Error-handling code sucks because it complicates the flow of the code that does real work. Consequently, most programming articles leave it as an exercise to the reader. This…

Reducing perceived latency

Before Instagram was a billion dollar company, Mike Krieger posted a presentation called Secrets to Lightning Fast Mobile Design about how his team made the Instagram photo-sharing application feel so responsive, which is one of the key reasons their company has garnered so many users so quickly. This slide caught my attention because the same trick is a cornerstone of good online game design: Why…

Writing Server and Network Code for Your Online Game

I spoke this year at the Game Developers Conference (GDC 2012) on “Writing Server and Network Code for Your Online Game”. Since I tend to talk quickly, to say the least, I thought it only fair to post my presentation slides for those who attended but didn’t manage to take notes fast enough. I find that most slide decks are quite worthless because, while the slides outline the presentation, what…

Installing firewall exception rules programmatically

Writing installers for applications requires a substantial effort, even when using tools like InstallShield. My challenge for today was to write as little code as possible (because I’m lazy) to configure Windows Firewall exception rules so that the game I’m working on wouldn’t “pop” a dialog box asking the user to configure firewall settings — this freaks out users and is generally considered a…

Your new() is not my new()

One of the problems I’ve experienced using third-party DLLs is the way that they handle new and delete for C++ classes, which can lead to memory leaks or even memory corruption. This was a particular problem when developing the Guild Wars model and animation exporter for 3ds Max, since 3ds Max uses plugins extensively, many written by different teams without the same coding standards as the…

Using transaction rate-limiting to improve service reliability

I develop and publish multiplayer games for a living, and have discovered some useful solutions for running reliable online services. The one I’m writing about today is how to implement reasonable usage limits so that services are less likely to be abused by hackers. Y’see, hackers find ways to manipulate games by simulating the behavior of human players, but in ways that exploit bugs and…

A better way to update SQL stored procedures

A common pattern to manage SQL stored procedures is to drop the current procedure and recreate it. Unfortunately, this doesn’t work if you’re trying to run a high-availability service. Here’s the (broken) drop+create pattern: -- Delete the stored procedure if it already exists if exists ( select * from sys . objects where name = N'p_MyProc' and type = N'P' ) begin drop procedure p_MyProc end go --…

Recent Comments