Here at Ars, we're suckers for stories about hackers getting Doom working on whatever from CAPTCHA robotic checks and Windows' notepad.exe to AI hallucinations and fluorescing gut germs. Regardless of all that experience, we were still tossed for a loop by a current presentation of Doom running in the normally fixed boundaries of a PDF file.
On the Github page for the quixotic job, coder ading2210 goes over 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 completely recorded in Adobe's main PDF specifications– is presently executed in a more restricted, more safe kind as part of PDFium, the integrated PDF-rendering engine of Chromium-based internet browsers.
In the past, hackers have actually utilized this obscure Adobe function to code basic 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 filled, the Doom PDF can take inputs through the user typing in a designated text field and create “video” output in the type of transformed ASCII text fed into 200 private text fields, each representing a horizontal line of the Doom screen. The text in those fields suffices to mimic a six-color black and white screen at a “quite bad however playable” 13 frames per 2nd (about 80 ms per frame).