Devlog

The blood Diablo was meant to have

Diablo's makers wanted it gritty and gory. The game shipped with most of its blood painted into the floor of one room. We went back to that room to learn how they did it, then taught the engine to paint blood the same way, everywhere, as it happens.

Gritty and gory

In 1994 Condor, the small studio that became Blizzard North, sent out a pitch for a game called Diablo. On its seventh page, among the art requirements, is a line we keep coming back to:

"Each monster will have multiple graphic deaths and will require at least 50 frames of animations."

Condor, the Diablo pitch, 1994

Erich Schaefer, the game's lead designer and art director, remembered the mood they were after:

"We wanted it to be gritty and gory. I wanted you to kill the first monster by bludgeoning its head in with a shovel, before you even got a sword."

Erich Schaefer to IGN, 20 Years of Diablo, 2017

The game that came out in 1996 is dark and grim and we love it, but it isn't very bloody. Every zombie in the Cathedral falls the same way. A hit throws a few red specks, and when the fight is over the floor is clean. Here is the same fight twice, swing for swing. Drag the divider:

Diablo (1996)Brutal Diablo
Five zombies in a Cathedral corner. In 1996 they fall the same way and leave nothing behind; in Brutal Diablo the blood stays. Work in progress, not the final version.

Brutal Diablo is our try at the game they described: the same game, the same rules, only bloodier.

Where Diablo already bled

Everyone who played Diablo remembers the Butcher's room. "Ah, fresh meat!", a charge, and a floor so soaked you can barely see the stone. That room became the reference for everything in this post, so we went and looked at it closely.

Its blood isn't an effect. Blizzard North's artists painted it straight into the floor and wall tiles, and that's why it looks so good. The stone's shading carries through the blood. The tops of the flagstones poke out where it's thin, and the cracks between them stay dark. The pools have pale, wet-looking curls on them, the splats are shaped like stars, the edges are hard, and the whole thing is dark, closer to old wine than to paint. Move over the picture to look closer:

Diablo (1996)The Butcher's room in Diablo (1996) seen whole: blood painted over its floor and up its walls, bodies on spikes and hooks
The Butcher's room in Diablo (1996), lit evenly so every stain shows; in the game it sits in the dark. Every drop of this blood was painted by hand into the floor and wall tiles.

So we set ourselves one rule: our blood should look as if it belongs in that room. If you can't tell a fresh kill from the painted floor around it, it's right.

Where the blood comes from

Blood needs a body. In 1996 each monster has one death, a short animation drawn by Blizzard North. We made new ones out of the same sprites: the monster's own pixels, split into pieces along its body and thrown through the same camera the original art was drawn with. A zombie can now burst, lose its head, split down the middle or come apart in strips.

Two rules made this harder than it sounds. A new death has to last exactly as long as the old one, frame for frame, because its last frame is gameplay. That's when the monster's tile frees up and its corpse appears, and in single player it decides the order of the random rolls that come after it. Change that, and it's no longer the same game. And skeletons don't bleed. They throw chips of bone, taken from the brightest pixels of their own sprite.

Each of these deaths has a sound effect of its own for now. Both the deaths and their sounds are a first step: we hope to replace them with deaths made from 3D models. The blood they spill is what the rest of this post is about.

A red that survives every monster

Diablo's monsters share their sprites. A Ghoul is a Zombie and a Horror is a Skeleton, recoloured by a translation table: a small file that says "draw colour 230 as colour 140 instead". It was a brilliant trick in a time when every kilobyte counted, and it's the first thing that broke our blood.

The game's palette has a fine red ramp, colours 224 to 239. Paint blood with it, then pick a monster and see what its table makes of it:

Monster
The game's red, 224–239, through the Skeleton's table
Colours 48–59, which no table in the game touches, on the level's own palette
Level

A Skeleton would bleed grey, a Horror dark grey and a Dark One pale blue, and even the Ghoul would bleed a flat cartoon red. Three of the nine sprite sets in the Cathedral are skeletons, so that's a lot of grey blood. We went looking for colours no table touches and found one: twelve shades of red at 48 to 59 that every translation table in the game leaves alone, the unique monsters' included. Blood stayed red on every monster.

Then we went down the stairs. Colours 48 to 59 belong to the part of the palette each area brings with it, and they're red only in the Cathedral. Switch the level above: in the Catacombs the same twelve colours are khaki, in the Caves brown, in Hell a dusty mauve. Our blood went khaki with them.

The fix waits until everything else is done. When a monster is drawn, after its own table, the blood is moved to the red that every area shares, because colours 128 to 255 are the same in all of the game's palettes:

A fight in the Catacombs with khaki-grey bloodThe same fight with red blood
BeforeAfter
The Catacombs, the same moment twice: the level's own colours 48–59, then the shared red.
Dead end

Our first version moved the blood to the far end of the red ramp, and the pools went almost black, even in the Cathedral:

Pools in the Cathedral, redThe same pools with the rejected remap, nearly black
RedRejected

The reason is how Diablo does light. Its palette is cut into runs of sixteen shades, and to darken a pixel the game moves it a few steps down its run. Step off the end, and the pixel turns black. Move the darkness:

The red run, 224–239, and where two pools sit on itDarkness: none
Kept: starts at step 8
Rejected: starts at step 12, still red

The rejected blood sat too close to the end of its run, so a little shadow pushed it over the edge. Starting it earlier fixed it: now the dark of the dungeon darkens our blood exactly as much as it darkens Blizzard's.

Leaving the box

Every frame of a sprite lives in a box, 128 by 96 pixels for a zombie, and a death drawn ahead of time can't throw anything outside it. The blood that flies across the room comes from a second layer that runs live in the game. Drag the divider to switch it off:

The death aloneWith the live layer
The same blow twice, slowed down for the first second. On the left, everything stays inside the sprite's box; on the right, the drops leave it.

The live layer throws its drops on the game's own clock, twenty ticks a second. Each drop's height is kept apart from its place on the floor, so a drop in the air still belongs to the tile under it: it hides behind the right wall and takes the right light, without the renderer ever knowing about height.

It also rolls its own dice. When a monster dies, Diablo resets its random numbers to pick the loot, and the loot must never change because something bled. In multiplayer every player's game throws its own spray and nothing extra goes over the network. Two players see different drops from the same kill, which costs nothing for something you only look at.

From square confetti to drops

The live layer was first written for the original art, where a drop is one pixel. Brutal Diablo draws the game four times larger, and those drops became flat squares of 4×4 pixels: red confetti next to the recreated art. Now each drop is drawn in the fine pixels, with its head at its exact position, a dark rim, a highlight up and to the left, a streak behind it when it's fast, and a star where it lands, pointing the way it flew:

Square blood drops a moment after a killThe same moment with drops drawn in the fine pixels
SquaresDrops
Four tenths of a second after the blow, the same frame twice, at the size the game draws it.

For the pools we tried four looks in the game, on the same fight, frame for frame: glossy, grim, thick, and one that copies the Butcher's room. The last one won, and it's the idea in this post we're proudest of.

Each blood pixel takes its shade from the floor under it. Remember the runs of sixteen: a lit floor pixel tells you how many steps the light has moved it, so you know the shade it had before the light. The blood takes that same shade from its own red, and then the same light darkens both. Thin blood lets the tops of the stones through, thick blood is flat and dark, as in the painted room. The test was the room itself:

OldNew
A kill inside the Butcher's room, at the size the game draws it, slowed down for the first second (the Butcher held still for the test). The new blood is hard to tell from the floor Blizzard North painted, and that's the point.
Dead ends

We built glossy, grim and thick first. Each looked good on its own, as a fresh effect laid over the floor, and that was the trouble: you could always see it was laid over. After playing with them we wrote ourselves one line, make it as much a part of the original game as possible, and the fourth look came from that. The same kill, a second later, in all four:

  • Glossy blood: bright, flat red pools with a sheen
    Glossy: bright, with a sheen.
  • Grim blood: darker red, thinner pools
    Grim: darker and duller.
  • Thick blood: heavy, opaque red pools
    Thick: it covers the stone.
  • The kept look: blood shaded from the stones under it
    The Butcher's room: shaded from the stone. Kept.

Try it

Here is the same blood code, carried over from the game to your browser, on a patch of the Cathedral's own floor in the game's light. There are no walls, so no wall blood, but the drops, the marks and the pools are the game's. Hit the zombie, or kill it:

Click the floor next to the zombie and you hit it from there, so the blood flies the other way. Kill finishes it off, and the body bleeds a pool. The blood stays and slowly dries darker.

A floor, not a lattice or a carpet

Blood on the floor is stored per tile. Each floor tile remembers how much blood soaked into it and which colours, one byte each. It costs almost nothing, and it lasts the whole level.

Our first try drew each tile's stain inside its own diamond, and the floor turned into a lattice, every blob cut along the same diagonals. Now each tile paints its pixels from the splashes of all its neighbours, so a splash crosses tile edges freely, and the rim of a pool is pushed in and out per pixel so it's ragged:

Draw stains
The game's stain code on the game's floor, after the same fight, drawn both ways.

The next problem was a long fight in a doorway: every tile soaked to its maximum and the floor became a red carpet. Now each little block of tiles holds a limit, and when a new stain needs room the oldest one makes way. Never the newest, so fresh blood always shows.

0%4%8%12% 306090120 kills without the limit: 11.1%with it: 6.8%
120 kills on one spot, two a second, measured as the share of red pixels around it. Without the limit the floor keeps soaking; with it, the spot levels off as spatter on stone.

And the blood stays. We tried stains that fade or thin out with time and dropped both, because nothing should take blood off a floor nobody is fighting on. It only dries: fresh blood is a shade lighter and wet, and after about a minute and a half it's two shades darker and dull:

Four moments of the same pools drying darker
The same pools, fresh to dry.

Blood on the walls

A drop that hits a wall the camera can see paints a blot. A second drop close to it doesn't add a new spot; it makes the blot bigger, so a wall that took many hits gets large painted shapes instead of a cloud of specks. Each blot throws a few small drops of its own, runs down in drips over about a second, and blood gathers at the foot of the wall.

Blots that grow, and drips that run.
A bug that took a while

In the first version, when the hero walked away, the blood on a wall jumped to a different pattern:

Three frames of the same wall: the blood pattern changes as the hero steps away

Diablo doesn't clear the screen between frames. With the camera standing still, the wall was drawn again over the same stone, and the code that decides which pixels belong to the wall couldn't tell them apart. Fixed, a blot holds its place and only fades with the light:

The same wall: the broken build with part of the blot missing, the fixed build, and the fixed build after a walk

The last step was the light. Blood on a wall now takes its shade from the stone under it, the same way as on the floor, so a blot in the shadow of an arch is darker than one by a torch:

Wall blood as flat bright paintThe same wall blood shaded as the stone under it
PaintLit as stone
The same wall in the Cathedral.

Footprints, and the pools under the dead

Walk through a pool and you leave red footprints for the next eight tiles. Every corpse bleeds a pool that spreads from under it for fifteen seconds, and a kill on top of an old pool makes it bigger, in the pool's own colour.

Press H for 1996

All of this is drawn on top of the game Blizzard North made, which keeps running underneath, swing for swing. That's how the slider at the top of this post works, and in the game the H key does the same, anytime: one press and you're back in 1996, the blood gone with the new art.

What's next

We're working on rebuilding the monsters in 3D, so the game could make its deaths instead of us drawing them one by one, ahead of time, for the Cathedral's monsters. The blood is ready for them: it's the same red on every level. That's a story for a later post. Brutal Diablo is free, and coming early 2027.

Thanks to DevilutionX, which keeps Diablo running on today's machines and made all of this possible, and to Blizzard North, who painted the Butcher's room in the first place. More of the gore, in motion, is on the gore page, and if you'd like to talk about any of this, or tell us what we got wrong, come to our Discord.

Tips

Brutal Diablo will be free once released. Throw a coin and it goes into dev time, GPU hours and coffee.

This mod is a love letter to the original game, so nothing here is for sale. But every tip really helps us keep the development going. Thank you.

Tip on Ko-fi