Galaxy-brained high schooler ports Doom to a PDF file, paving the way for a bloody revolution in invoicing

Doom running in a PDF file
(Image credit: id Software, ading2210)

Porting Doom to inappropriate platforms is one of the internet's favourite hobbies. Devices compatible with id Software's definitive FPS now include Lego bricks, pregnancy tests, and player-pianos. One ingenious PhD student even displayed Doom on gut bacteria cells, making the shooter a literal cultural phenomenon.

Now, an enterprising high schooler has further extended Doom's platform omnipresence, successfully porting the FPS to a PDF pile. This latest bizarre port of Doom, creatively named DoomPDF, is the work of github user ading2210, who describes themselves as a "high school student with an interest in programming, web development, and cybersecurity".

Porting Doom to a PDF file is possible, ading2210 says, because the PDF file format supports Javascript. Indeed, they point out that the full specification in Adobe Acrobat "contains some ridiculous things like the ability to do 3D rendering". In theory, this makes a port of Doom to a PDF relatively straightforward. However, ading2210 points out that "On Chromium and other browsers, only a tiny amount of this API surface was implemented."

As for how they approached the port, they say that compiling it to run was easy enough, as was facilitating keyboard inputs, as "Chromium's PDF engine supports text fields and buttons." Making the game run satisfactorily within the file was "a lot more of a challenge", however which ading2210 explains as follows:

Previous interactive PDF projects I've seen use individual text fields that are toggled on/off to make individual pixels. However, Doom's resolution is 320x200 which would mean thousands of text fields would have to be toggled every frame, which is infeasible. Instead, this port uses a separate text field for each row in the screen, then it sets their contents to various ASCII characters. I managed to get a 6 color monochrome output this way, which is enough for things to be legible in-game.

Ading2210

The result of ading2210's work can be played here, though ensure you're running a Chromium browser before clicking the link. It's an impressive technical feat, but as ading2210 admits, DoomPDF isn't much fun to play. Visually it's just about clear enough to see what's going on, but from a control perspective, DoomPDF is extremely unresponsive. Hitting a single target is difficult, while fighting larger groups of demons next to impossible.

Incredibly, this isn't the first time someone has ported Doom into document-adjacent software. A few years back, game developer Sam Chiet ported Doom into Notepad, with arguably superior results. Sure, you need to squint like you're chopping onions to parse what's going on, but Notepad Doom is much slicker beneath the fingers than its PDF cousin. Surely, it's only a matter of time before some bored computer whizz gets Doom running in Word, and I will be first in line to output Doom frames in Wingdings.

TOPICS