Doom running as Console.log() output in the Chrome web browser

Doom runs on many things, among them that little window of debugging information that web developers use to try and figure out why the Javascript isn't doing anything.

Id software gave us DOOM.

Cornelius Diekmann gave us DOOM via WebAssembly.

Healey gave us DOOM via Checkboxes.

Today, I'm pleased to stand on top of these giants' shoulders, and give you DOOM via Console.log().

How?

DOOM runs via WebAssembly in a hidden <canvas>. I use HTMLCanvasElement.toDataURL() to turn this into a base64 encoded string. A Console.log() is called with two arguments, "%c X", which is a random string that is going to be stylized by the next parameter, which is composed of css properties. I then attribute the base 64 into a background-url property, thus rendering it.

And here you can play it for yourself. It only works in Chrome, sadly.