Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I was a programmer on Diablo 2 and used the Diablo 1 source code as a starting point for some features - all of the source files I looked at had David Brevik as the author, it was very straightforward C that one person could keep in their head.


> I was a programmer on Diablo 2 and used the Diablo 1 source code

Don't leave us hanging, is there a hidden cow level in the Diablo 1 source?!


Ha - that would require some time travel plot twist, IIRC the cow level got added late in the D2 development as homage to the fans - I wrote the code for the Horadric Cube UI and the triggers to call the level/item changes (other programmers wrote the level stuff and item stuff separately). The gem that did nothing in the Battle.net chat was added just to spur rumors.


It's quite a serendipitous surprise to be able to meet the creators of one of the most played video games of all time (or at least me) on a random thread here.

What are you working on these days? Are you still in the games industry?


Programming, not games right now. Switched to mobile/server stuff so it might be difficult to change back.


Just so you know: my childhood and I love you.


Nooooooo! Why spoil the mystery of the chat gem!?

But also thanks for your work, still playing D2 :)


There's hope for a mystery, I only worked on D2 until 1.10 so they could have added a feature to the gem in a later version.


You tease :P


>> I was a programmer on Diablo 2 and used the Diablo 1 source code

> Don't leave us hanging,

Yes, don't leave us hanging!

Did you ever work on the problems of item duping on Closed Battle.Net?

I never understood why some games were "bugged": Certain characters would leave a game and find that their inventory would not save. This meant they could go back in the game, drop all their items, leave the game, and repeat this while the characters that did save could pick it up, creating copies of good items. The mule character could even join another game where it would save, stock up on good items and drop those.

I also never understood what would trigger a bugged game. We used IRC for announcing whenever a "run" turned out to be buggy for a single player. And I wrote an IRC bot for keeping track of item trades for some dudes who gave me several accounts full of characters full of really good items. I gave it to my brother who eventually made thousands selling those items.

> is there a hidden cow level in the Diablo 1 source?!

Diablo I has a ton of lost treasure hidden in diabdat.mpq. I recall that they shipped the game prematurely and simply dropped a large chunk of the storyline; full characters, dialogues, items, plot triggers. Some of that storyline ended up in Diablo II. I can't find a good archaeological overview online - perhaps this isn't as well-documented as I assumed.

If anyone feels nostalgic, there's a really good Diablo I mod called The Hell out there. I believe mods are written by disassembling the original game, extending this with your own, custom assembler code, and reassembling it. What a beautiful consequence of the simplicity of writing games in C.


OK, one of the item duping bugs was my fault. It took a while for one of the battle.net moderators to tease how to do it from one of the Chinese players using it to make a killing in real world cash. At some point we made the single player game that worked into a multiplayer game without changing anything else or reviewing the code for exploits - I did all the code for the interactive objects in the game and there was a trigger on objects that we should have made authoritative on the server ( and that million dollar lesson that I always learned to do nowadays in client server projects...) but wasn't for opening chests so people with modded clients we're able to open chests an infinite amount of times. I don't know about the bug you are describing - was it peer to peer or b.net multiplayer? Though it sounds like it would depend upon some server/client synchronization timing that was not working in all situations correctly, I didn't work on the network/server team, but we must have missed something like the other bug, where it made sense in single player but should have been thoroughly rethought.

A lot of the features we added to D2 were things the original creators wanted to do in D1 or even the D1 expansion, the D1 expansion was outsourced and they were really unhappy about the quality of the add-on and were determined to make things right with D2 and do the expansion in house as well. I finished my work early so I added the keyboard customization feature for fun. There's a making of book about Diablo 2 that interviews the guys who also started Blizzard North/made Diablo 1 so a lot of information about the process is in there.


Absolutely fascinating read. Thanks for sharing, strange to think that my computer has run your code countless times and contributed to years of enjoyment.


Usually a character leaving a game without having their inventory saved indicated a desync between the game server and the MCP servers. The game server was authoritative over your character for a specific game, while the MCP server was authoritative for your character between games. If the game server became disconnected from the MCP server for whatever reason, you could drop all of your items, leave the game, and the MCP server would still believe you had those items as the game server never saved your character's state with MCP.

This desynced state resulted in a ton of commonly known dupe methods in 1.11 and 1.12 where you forcefully disconnect the GS from MCP. The popular one was spamming bone wall (creating entities on the map), then spamming AoEs which interacted with said entities. The game server would have to loop over all entities for each AoE spell you cast to determine if the spell applied to it, which caused the single-threaded game server to spend too long in each iteration of the main game loop that caused it to desync from the MCP. Blizzard eventually "fixed" this by adding a check for how long the main game loop took to complete. If it hit a certain value, it would disconnect all players from the game to despawn entities and 'prevent' dupes.

There were more fun bugs between GS <-> MCP as well. For example for many patches there was a size limit on your character. If your character data was over a set size, the GS wouldn't even try saving your character to the MCP and would roll it back to the last valid save. If you joined a game near the limit, dropped an item, picked up an item that was larger in size (had more stats etc) which pushed you over the limit, then left the game, the server would revert your save back to when you had the original item.

D2 was full of esoteric exploits like these. It was made worse by some Blizzard developers going rogue and abusing the buggy state of the codebase to assist third party item sellers for personal profit.


You definitely have more expertise at your fingertips on the server side of D2 than I do!

I vaguely remember the strike team talking about those game server issues, it's been so long I totally forgot about it. We had the servers on racks in the data centers running Windows NT and I remember the very first problems were trying to get the game to support hundreds of games per server and finding all sorts of memory issues and network issues that caused the games to crash or run out of memory. I was unaware of the developers going rogue - that's wild.

But there was one guy in our office who got hauled away by the FBI because he was hosting a file sharing node using the office T1.


Just wanted to let you know I had countless hours of fun playing Diablo && Diablo 2. Thank you, those were great games!


Thank you for your work. I have spent thousands of hours playing your game, and even more than that trying to exploit it. Many of my dearest friends today are people I met 15 years ago while playing D2. The game has had a massive influence on my life.


You're welcome, there was a team of talented artists and programmers at Blizzard North and Blizzard South working together to make D2 so just my two cents.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: