If not for a few oversights on Blizzard’s part, the original Diablo’s source code would likely be lost to time. However, thanks to those oversights and some serious dedication from one coder, people can now see (and tinker around with) what makes Diablo tick.
Diablo, of course, basically birthed the PC action-RPG genre as we know it today. Released at the tail end of 1996, it’s a classic in every sense of the word. People are, as you might expect, very interested in seeing how such a formative game was built. Source code—the lines of code written by programmers, which you don’t see in the final version—is a missing piece in that puzzle. Most developers do not release their games’ source code, and Blizzard has a reputation for being especially secretive about its games’ innermost workings.
Galaxyhaxz’s “Devilution” project is a labor of love for game preservation and modding. They say it took them more than 1,200 hours over the course of four months, and they made sure that even bugs, flaws, and sloppy code were present and accounted for. Galaxyhaxz wants people to be able to see how Diablo ended up the way it did.
“Devilution helps document the unused and cut content from the final game,” they wrote in the source code’s documentation. “Development of Diablo was rushed near the end—many ideas were scrapped and multiplayer was quickly hacked in. By examining the source, we can see various quirks of planned development.”
They also noted that having access to source code means the game can continually be updated to run on newer hardware—something that’s become more and more of an issue over time.
In rare instances, a game’s developer will release the source code publicly, such as id Software with the original Doom. But Blizzard doesn’t do this. In fact, last year when a fan came across a disc containing Starcraft’s source code, Blizzard went to great lengths to get it back from him, including giving the fan a free trip to BlizzCon.
Galaxyhaxz has reconstructed what they believe to be Diablo’s original source code from bits and pieces that have inadvertently leaked out of Blizzard in the past. They cited a 1997 expansion to the game called Hellfire and made by Synergistic Software, as well as the PlayStation port of the game by Climax Studios.
“A symbolic file was accidentally left on the Japanese port, which contained a layout of everything in the game,” said Galaxyhaxz. “This includes functions, data, types, and more! A beta version of the port also leaked, which contained yet another one of these files.”
Galaxyhaxz further explained that the regular PC release of Diablo actually contains a hidden debug build, which gave them access to debug tools and more code. They then stitched all these strings of information together to recreate Diablo’s source code.
“Combining these aspects not only makes reversing the game much easier, but it makes it far more accurate,” they said. “File names, function names, and even line numbers will be fairly close to the real deal.”
This should make it easier for people to modify the game if they so choose, whether that means improving on flaws that have been annoying players for decades or overhauling the whole thing.
Now, a potential stumbling block: Galaxyhaxz says they’re not sure if Blizzard’s lawyers will come a-knocking on their door or not. They believe that Devilution’s documentation is sufficient to count as an exception to DMCA rules, but it’s still a “grey area.” I reached out to Blizzard for an answer to that looming question, but as of publishing, they had yet to give me a concrete answer.
Assuming it all goes well, though, it’s hard not to wonder what’s next for someone dedicated enough to make all of this happen. For the moment, Galaxyhaxz only knows one thing for certain: it’s not gonna be Diablo II.
“Diablo II is still supported, sold, and maintained by Blizzard,” they said. “Setting the legal implications aside, there’s about 8x as much code, and a chance Blizzard will remaster the game soon anyway.”