This PDF contains a playable copy of Doom

This PDF contains a playable copy of Doom

As an Amazon Associate I earn from qualifying purchases.

Woodworking Plans Banner

Here at Ars, we’re suckers for stories about hackers getting Doom operating on whatever from CAPTCHA robotic checks and Windows’ notepad.exe to AI hallucinations and fluorescing gut germs. In spite of all that experience, we were still tossed for a loop by a current presentation of Doom running in the generally fixed boundaries of a PDF file.

On the Github page for the quixotic task, coder ading2210 talks about how Adobe Acrobat consisted of some robust assistance for JavaScript in the PDF file format. That JS coding assistance– which goes back years and is still totally recorded in Adobe’s main PDF specifications– is presently executed in a more minimal, more safe and secure kind as part of PDFium, the integrated PDF-rendering engine of Chromium-based web browsers.

In the past, hackers have actually utilized this obscure Adobe function to code easy video games like Breakout and Tetris into PDF files. Ading220 went even more, recompiling a structured fork of Doom‘s open source code utilizing an old variation of Emscripten that outputs enhanced asm.js code.

With that code packed, the Doom PDF can take inputs through the user typing in a designated text field and create “video” output in the kind of transformed ASCII text fed into 200 private text fields, each representing a horizontal line of the Doom display screen. The text in those fields suffices to mimic a six-color black and white screen at a “pretty poor but playable” 13 frames per 2nd (about 80 ms per frame).

Learn more

As an Amazon Associate I earn from qualifying purchases.

You May Also Like

About the Author: tech