“Saved my hide, it did. The alien’s broad back shielded me as its brethren flung their fiery mucus wads; the fireballs burst, spraying flaming, red liquid that dribbled down my dance partner’s legs to pool on the ground, lighting the room with a hellish, red glaze. I fired nine or ten times, finally blowing a hole clean through the alien … a gory loophole through which I turned on the rest.”

Knee Deep in the Dead, Dafydd Ab Hugh and Brad Linaweaver’s novelisation of Doom, is perhaps a little more theatrical than the Doom that played in my head during the summer of 1994. It features a sidekick and talking demons, and dramatised sequences in which protagonist Corporal Flynn Taggart finds ammo and bumps up against walls to find secrets. But it captures something of Doom’s intensely graphic nature. Doom was the first game I played that felt truly fluid and direct.

Playing Brutal Doom [official site] today feels like Doom always did, despite its custom levels and gouts of blood and gore, death animations and chugging live versions of Doom’s MUS originals. It overhauls pretty much every element of the original, and yet it’s the Doom that plays in my memory, amplifying the original’s gore and immediacy to suit a post-COD, Gears of War – heck, Soldier of Fortune – world. For me, the latest version, v20b, reaches a state of the sublime. But while the blood that drips from ceilings and screen-filling viscera are its obvious achievements, something far more prosaic lies at the root of how it works so well.

THE MECHANIC: Hitboxes.

Sergeant_Mark_IV never planned to make a mod as focused as Brutal Doom. A veteran of Warcraft 3 map making (“I had the terrible habit of attempting to make maps that had nothing to do with Warcraft itself, with themes such as World War III and the first Gulf War”), he originally set out to make a crazily ambitious total conversion called ArmageDoom. An unofficial sequel to Doom 2, it was meant to have a campaign representing Earth’s last stand against the demons, 20 weapons, 40 new enemies, drivable vehicles and it got as far as a beta, albeit bug-ridden and with only eight maps and a fraction of the planned features.

It was proving too much to handle, so Sergeant_Mark_IV decided to step back and look at one challenge he was facing: introducing a sniper rifle. “It was a completely redundant weapon, since the firefights usually happens at either close or mid range, and the lack of a headshot system made the accurate shoots have no real use,” he says. But it lodged an idea, that of developing for Doom a hit detection system so enemies would receive different damage values depending on where they were hit.

At the same time, he had a hankering to create a new blood system. Like many Doom mods, ArmageDoom was built on ZDoom, an enhanced port of the original Doom engine to Windows which among many other things adds mouselook, and its gore system borrowed from two gore-producing mods, Nashgore and Ultragore. The Doom engine cannot natively draw decals on floors and ceilings, since floors and ceilings don’t technically exist, but Sergeant_Mark_IV developed a way of simulating decals using flat 3D models.

With the ability to shoot a zombie’s head off and paint the room with explosions of blood, Brutal Doom was born. Testers loved the extra feedback Sergeant_Mark_IV’s prototype gave. Encouraged, he started to pile in more and more features – smoke and fire, reloading, light flares. “It became my obsession,” he says. “I started to add everything that I used to imagine should be in a sequel to Doom 2. It went from ‘student project to learn how to use the engine’ to ‘how I wish Doom 3 was’.”

Brutal Doom’s gore system is built on a single function from Heretic’s source code called A_TossGib. It randomly throws things in random directions and was frequently used by other mods as a way of spawning particles. Over time it was steadily refined to add more control over the properties of these particles, and so in Brutal Doom, every gib, splatter of blood, flame or puff of smoke is a projectile with gravity and ability to bounce so that it interacts with the environment.

As a way of illustrating just how deep Brutal Doom’s gore system goes, and how Sergeant_Mark_IV hacked a hardcoded form of physics into a 23-year-old game, we can look at what happens when you kill an imp with a shotgun. When you click the mouse button, the game sends out a hitscan – traced lines between the player and where they’re facing – to see if it intersects with an object. So far, so vanilla Doom. But when a vanilla Doom monster is just one big rectangular hitbox, Brutal Doom’s have three, the body joined to smaller boxes at the head and legs.

So let’s imagine the shotgun has hit the imp’s legs. The imp’s hitbox spawns small explosions, which are set to only harm the monster that spawns them. The resulting damage is calculated and applied to the imp. If it’s enough to kill it, and the blast is from short enough range, it will jump to an animation frame in which one of its legs is cut off, and then randomly to one of various different sets of frames which include dropping to the floor dead, hopping on one leg for a few seconds before collapsing, or kneeling in agony until it either bleeds out or the player finishes it off.

A torso hit that’s strong enough to kill the imp triggers different responses. If the imp is more than 200 in-game pixels away, it simply dies. Closer hits will push the imp backwards, usually triggering one of two the animations. The first has it flipping through the air and rolling on the ground until it loses momentum (it will therefore continue to roll if on stairs). The second violently throws it backwards; if it hits a wall, it will display a frame of the imp sat on the ground with its back to the wall. More rarely, two alternative animations may be displayed in which the imp loses a limb, or its guts are sent flying out of a hole in its stomach. Going back to our dead imp sitting against the wall, if the wall is a door and it’s opened, the imp will slump to a lying position. Moreover, sitting imp retains its hitboxes, so it can be further mangled if the player keeps shooting it.

Headshot kills do much the same thing. The imp’s jaw might be destroyed, launching jaw and teeth sprites in random directions. Or its forehead might be shown pierced by a bullet and the back of its head given a large exit hole, with brain and blood launched out from it. If they strike a wall, they will slide down it. If the player causes enough damage to push its health to -60 points, the imp’s head will explode, Scanners-style, spawning and launching blood and various bits of skull, brain, teeth and jawbone in all directions.

Hitting a zombie with a rocket leads to yet more scenarios. If the blast lands far enough away that it isn’t killed, it will be knocked out for two seconds. If the zombie should fall more than five metres as a result of a rocket’s concussive blast, it will die on hitting the ground. If the rocket hits the ground close enough to kill the zombie, it will push it up and over obstacles (its sprite shows it burned by the blast, and its eyes will pop out). “It causes a very nice effect when you fire a rocket or grenade inside a bunker-like structure full of humanoid enemies, as they are sent flying away from the windows,” says Sergeant_Mark_IV.

A direct hit will simply blow the zombie apart. Distinguishable gibs are spawned and launched at random directions, including its head and limbs, which can be shot or kicked into smaller pieces. Gibs are set not to bounce, so they stick to walls, and then a second gib replaces them that is launched at a slowly accelerating rate so it slides down.

Sergeant_Mark_IV also controls the amount of blood that sprays around. Severed limbs spawn more than bullet impacts. “Others required deeper investigation of human anatomy,” he says. “Like trying to guess how much blood would fly away if you directly hit humanoid creatures with anti-materiel weaponry.” Only some specific death animations, such as point-blank double blasts with the super shotgun, will send out blood and gibs in specific directions; they otherwise fan out. He has also refined the puddles of blood on the ground, which were larger and denser in early versions than they are in v20b. “I made them look sharper and have a more stained look in favour of improving realism, satisfactory feedback, and improving performance.”

In fact, he’s been doing a lot to tone down the gore since Brutal Doom first appeared. As much as it looks the opposite, the philosophy underlying it is one of balance and restraint; Sergeant_Mark_IV feels Brutal Doom’s success is down to being neither too over-the-top, nor too realistic. “They are a mix of both, an equilibrium between cartoonish violence and gruesome horrors of war. In early versions of Brutal Doom, everything was over the top. Firing a bullet into an zombie’s chest would spawn a fountain of blood, firing at the head would paint the entire room red. It was tasteless, overdone, and got boring fast.”

One could argue that Brutal Doom is tasteless in its entirety. Sergeant_Mark_IV’s apparent enthusiasm for researching real injuries has landed him in some controversy. Then again, Doom was a model of tastelessness before it, and used similar source material. But within all the excess of both Doom and Brutal Doom lies deep rigour, rigour that you can feel in how good they are to play. So, why Doom? “Why not Doom?” says Sergeant_Mark_IV, detailing the ease with which it can be edited and modded. “It’s the greatest game ever made.”