HN user

netcoyote

1,454 karma

Hi, I'm Patrick Wyatt, a game developer and programmer.

I helped create Warcraft, Diablo, StarCraft, Guild Wars, battle.net and more. I helped publish Aion and Tera, two MMOs created in Korea.

I co-founded ArenaNet (https://www.arena.net) and One More Game (https://www.onemoregame.com).

I have a blog (https://www.codeofhonor.com) about game development and my years at Blizzard Entertainment.

I write open-source software (https://github.com/webcoyote) including:

- SandVault sandbox AI agents inside a limited-user account on macOS (https://github.com/webcoyote/sandvault)

- ClodPod sandbox AI agents inside a macOS virtual machine (https://github.com/webcoyote/clodpod)

- Git-Multi-Hook enables multiple global and per-repository git hooks with no configuration, and existing hooks keep working (https://github.com/webcoyote/git-multi-hook)

My email is pat@codeofhonor.com

Posts1
Comments100
View on HN
Codeberg Is Down 25 days ago

Git is a DVCS, but many companies have a build server/cluster that depends on Github or Codeberg being available.

Teams I've worked on for the last several decades aim to push 10-20 builds per day to external alpha testers, so any downtime in Github is going to be an impediment.

My first programming position was a summer job while in college. I worked for a small company that specialized in Stage 1 research grants, and they had secured funding from NIH (USA - National Institutes of Health) to build a prototype food logging app for OS/2, to be used by consumers to log their meals.

Food logging is a ridiculously complicated task. Starting from "I ate chicken with rice, some salad, and some ice cream", this leads to myriad questions:

- What part of the chicken? Breast is lower fat than thighs.

- Did you remove the skin?

- How much chicken did you cook? Did you eat all of it, or leftovers?

- Did you cook it in oil? How much oil? What kind? Cooking temp & duration?

- You added some spices, right? What kind? How much?

- What kind of rice? White, Brown, Arboreal, Jasmine? White rice is basically sugar, might as well have a can of Pepsi.

- Was your salad a real salad with vegetables, or a tepid Caesar salad of iceberg lettuce, cheese and croutons. Did you have dressing? I hope you had vinagrette, but probably ranch.

- Be honest, you horked down the entire container of ice cream, didn't you.

- etc.

My job was to build an app that made it easy for a family member to log their consumption for everyone in the family, in just a few minutes, because the longer it takes, the less likely it is that they'll log anything.

I was given the source code to a previous project from another Stage 1 research grant that had a food/nutrition database (using BTrieve, a Terminate-and-Stay-Resident DOS application).

At the end of the summer, I had a working program that showed it was conceptually possible to do this, if you were a really good typist. While it was a Windows GUI app, using buttons and dropdowns was way too slow for data entry, so the app was designed to make it easy to enter data by typing and tabbing.

I convinced them to use MS Windows 3.0 instead of OS/2 because even then it was clear (even to me, a dumb college kid) that no one would ever use OS/2 in the home market.

Re-envisioning the problem as one where users take pictures is a big step forward, but there's still going to be a whole lot of approximation on calories and nutrition because it's necessary to guess what's inside the food concoction.

On the other hand, just using an app like this to track is great for users just to create more visibility and awareness of what they're actually eating.

One of the tricks that we can use as good managers is code ownership. The folks who wrote the code are the ones who get to fix the bugs in the code.

While they’re busy fixing their own problems, the teams that wrote outage-free code get first dibs on writing new systems.

On the (online game) teams I worked on there are an infinite number of new & exciting systems needed, so this approach means that the best developers are the ones building them.

The precommit checks I run are:

- end-with-blank-line: normalize file endings

- find-do-not-commit: do not commit files that include "DO NOT COMMIT"

- lint-code: run `$REPO/scripts/lint` if it exists

- lint-nodejs: run `$REPO/{pnpm/yarn/npm}` lint if `package.json` exists

- lint-shellcheck: shellcheck all the files that have no extensions or end in `.sh` that have a shell-shebang

- lint-swift: run swiftlint

- prevent-commit-secrets: run ripsecrets to avoid committing secrets and credentials

- validate: run `$REPO/scripts/validate` if it exists

By default all of the scripts check the files in the git staging area, but they can also be run standalone to check everything. You can find them here: https://github.com/webcoyote/git-multi-hook. Glad to take suggestions for more.

Here's what gemini says about running hooks in parallel:

Native Git traditionally executes hooks sequentially. However, you can achieve parallel execution by leveraging dedicated third-party hook managers or using built-in shell background processing

.. and that's what git-multi-hook is: a third-party hook manager, that uses shell background processing :)

You are correct: git 2.54 supports multiple hooks via a the git repo and global configuration files.

Git-multi-hook predates that, but I updated it to use the new 2.54 config-based format.

The significant advantage of git-multi-hook is that they all run in parallel. I run eight hooks on precommit, so parallelism is a big win.

I will update the README to make note. Thanks!

Tools I’ve built for myself:

- sandvault https://www.codeofhonor.com/projects/sandvault/ runs agents in a separate macOS user account, hardened with sandbox-exec. It also supports headless browsing and iOS Simulator from inside the sandbox for testing web and iOS apps.

- clodpod https://www.codeofhonor.com/projects/clodpod/ agents run inside a macOS VM.

- 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.

- TubeGate https://www.codeofhonor.com/projects/tubegate/ Chrome extension to block YouTube videos based on keywords (like “sponsored”).

- push10k https://www.codeofhonor.com/projects/push10k/ iOS app to track my progress toward 10,000 push-ups.

My blog is AI-coded: Zola static site, Sveltia CMS, Cloudflare Pages/Workers, with GitHub Actions handling builds and syndication. https://www.codeofhonor.com

revenue != margins

There are 20,000 games released per year that split all that revenue, minus the cost of building those games.

Zed 1.0 3 months ago

I've tried a lot of editors, including Zed, and always come back to Sublime Text.

I use it every day. The #1 reason is because it never loses unsaved files (though I'm still working on breaking the habit of typing a few characters and pressing Ctrl-S). Column editing! Macros! Record/Playback! Configuration! Plugins! Responsiveness! Low resource utilization! Etc!

Why wouldn't I pay for it? I've bought all four versions. The author deserves to be paid.

I guess the question is: why don't you want to pay for it? Assuming here that you're a professional coder being paid a reasonable, US-equivalent salary. I understand not everyone fits that situation; plenty of us pirated software as starving college students / interns, folks in other countries don't get the same pay for the same work, etc.

We should all want to pay the authors of great software. We're on HN, which is a celebration of creating great code and awesome businesses.

"Pay him. Pay that man his money" - Teddy KGB

Oh, and I forgot to mention that pause had to be synchronized across the network, so the pause button would pause for all players.

And in the "this is why we can't have nice things", that also introduced problems, because we didn't want a player who was losing to keep pausing the game until the winning player quit out of frustration, so I think we kept a per-player pause counter, which would only be restored if other players also paused? (I don't quite remember all the details, just that we had to prevent yet another abuse vector).

One of the fun features that I developed for Warcraft (the RTS) was to fade the screen to grayscale when the game is paused.

Since the game uses a 256 color palette, it was only necessary to update a few bytes of data (3x256) instead of redrawing the whole screen, so the effect was quick.

I also used this trick when the game stalled due to missing network packets from other players. Initially the game would still be responsive when no messages were received so that you could still interact and send commands. After a few seconds the game would go into paused state with grayscale screen to signify the player that things were stuck. Then several seconds after that a dialog box would show allowing a player to quit the game.

This was much less disruptive than displaying a dialog box immediately on network stall.

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-automa...

This type of problem plagues all sorts of software. Having experienced this type of problem before, for Guild Wars game servers -- which run deterministic game instances that live for long periods of time -- we initialized a per-game-context variable that gets added to Windows GetTickCount() to a value such that the result was either 5 seconds before 0x7fff_ffff ticks, or 5 seconds before 0xffff_ffff ticks, so that any weird time-computation overflow errors would be likely to show up immediately.

Whoops! I didn't hear about that one, though it was a common occurrence in the earlier days of the game industry. Please share details, if you're able.

On a related note, I worked on Battle Chess, porting it from DOS/Amiga to Windows 3.1, and later to Windows 95 ("MPC Battle Chess"). Every few years a new producer from Interplay would call me and ask for a copy of the source code so they could rebuild it, because they lost their own copies. One of those times it was because they discovered their weekly backup tapes were all blank.

I did work on Lost Vikings; it was the first original game I had occasion to help develop, and it was a standout moment for Blizzard nee Silicon & Synapse: we proved to ourselves that we could make a game from scratch.

I never developed standalone demos -- I was already working so many hours at work there wasn't much left over for, y'know, regular things like having a life.

Warcraft 1 (1994), Warcraft 2 (1995), and StarCraft (1998) all use power-of-2 aligned map sizes (64 blocks, 128 blocks, and 256 blocks) so the shift-factor could be pre-computed to avoid division/multiplication, which was dang slow on those old 386/486 computers.

Each map block was 2x2 cells, and each cell, 8x8 pixels. Made rendering background cells and fog-of-war overlays very straightforward assembly language.

All of Warcraft/etc. had only a few thousand lines of assembly language to render maps/sprites/fonts/fog-of-war into the offscreen buffer, and to blit from the offscreen buffer to the screen.

The rest of the code didn't need to be in assembly, which is too time-consuming to write for code where the performance doesn't matter. Everything else was written in portable assembler, by which I mean C.

Edit:

By way of comparison, Blackthorne for Super Nintendo was all 85816 assembly. The Genesis version (Motorola 68000) and DOS version (Intel 80386) were manually transcribed into their respective assembly languages.

The PC version of Blackthorne also had a lot of custom assembler macros to generate 100K of rendering code to do pixel-scrollable chunky-planar VGA mode X (written by Bryan Waters - https://www.mobygames.com/person/5641/bryan-waters/).

At Blizzard we learned from working on those console app ports that writing assembly code takes too much programmer time.

Edit 2:

I recall that Comanche: Maximum Overkill (1992, a voxel-based helicopter simulator) was written in all assembly in DOS real mode. A huge technical feat, but so much work to port to protected mode that I think they switched to polygon-rendering for later versions.

Yeah, that really resonated; the author captured something about the way kids explore.

It brought back memories of when I first started using a Unix time share at university, and exhaustively read all the man pages. Didn’t know why, just wanted to discover everything.

What's stopping your agent from overwriting an arbitrary source file (e.g. index.js) with arbitrary code and running it?

You're absolutely right :)

And even if it could be sandboxed at the source code level, what's to prevent a nefarious AI from writing an executable file directly as bytes that calls (e.g.) `unlink`?