This PDF contains a playable copy of Doom

Date:

Share:



Here at Ars, we’re suckers for stories about hackers getting Doom running on everything from CAPTCHA robot checks and Windows’ notepad.exe to AI hallucinations and fluorescing gut bacteria. Despite all that experience, we were still thrown for a loop by a recent demonstration of Doom running in the usually static confines of a PDF file.

On the Github page for the quixotic project, coder ading2210 discusses how Adobe Acrobat included some robust support for JavaScript in the PDF file format. That JS coding support—which dates back decades and is still fully documented in Adobe’s official PDF specs—is currently implemented in a more limited, more secure form as part of PDFium, the built-in PDF-rendering engine of Chromium-based browsers.

In the past, hackers have used this little-known Adobe feature to code simple games like Breakout and Tetris into PDF documents. But ading220 went further, recompiling a streamlined fork of Doom‘s open source code using an old version of Emscripten that outputs optimized asm.js code.

With that code loaded, the Doom PDF can take inputs via the user typing in a designated text field and generate “video” output in the form of converted ASCII text fed into 200 individual text fields, each representing a horizontal line of the Doom display. The text in those fields is enough to simulate a six-color monochrome display at a “pretty poor but playable” 13 frames per second (about 80 ms per frame).



Source link

━ more like this

How Data Centers Actually Work

Lauren Goode: Well, they're all interested in growing more. Who among us, Mike? But the hyperscalers refers to this class of major tech...

Flat September for hospitality sales but pub trends positive as crucial final quarter starts  – London Business News | Londonlovesbusiness.com

Britain’s top managed restaurant, pub and bar groups delivered like-for-like sales growth of 0.2% in September, according to the latest CGA RSM Hospitality...

UK ETA for US citizens: Understanding the new travel rules – London Business News | Londonlovesbusiness.com

Venturing across the pond? There are some new pre-departure arrangements you must make. Everyone understands the special relationship between the US and the...

Gold falls below $4,100; CPI in focus – London Business News | Londonlovesbusiness.com

Gold retreated below USD 4,100 per ounce on Friday, resuming its decline after a brief rebound yesterday. The metal saw an end to its...

The best headphones for running in 2025

Whether you’re already an avid runner or hope to be one as you start a new training regimen, you’ll get more out of...
spot_img