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

Dodgers vs. Blue Jays, Game 1: How to watch the 2025 MLB World Series without cable

The League Championship Series are history, and the final two teams have emerged: The 2025 Fall Classic will see the Los Angeles Dodgers...

Why London Companies Should Outsource Their Payroll

Running a business in London means operating in one of the most competitive, fast-paced, and regulated environments in the world. Every decision —...

Trends driving UK housing development today – London Business News | Londonlovesbusiness.com

The UK housing development market is continuously changing and evolving. It is fascinating to observe the ways in which the market has been...

Why content saturation doesn’t exist: How to find hidden niche keywords – London Business News | Londonlovesbusiness.com

Do you stare at your keyword research tool and think, “Everything has been written already!”? Don’t worry, you’re not the only one. But...

Digital Kazakhstan: Now banking operations in the Freedom Bank app are performed by AI – London Business News | Londonlovesbusiness.com

Freedom Bank in Kazakhstan has implemented Artificial Intelligence (AI) into its business services. Within its super app, the bank has launched a voice-based...
spot_img