A high school student created a Doom (1993) port inside a PDF file. Ading2210 created DoomPDF, inspired by the recent release of Pdftris—Tetris (1985) in a PDF and a version of Breakout (1976) ported to a PDF container several years ago. Like PDFtris, DoomPDF relies on the support of the document file format for Javascript. Still, this time, those interested in playing must fire up a Chromium-based browser to satisfy their curiosity.Ading2210 comments that the JS specification for Adobe Acrobat is extensive, supporting things you would expect to be well beyond its scope, like 3D rendering and monitor detection. Modern browsers might only support a subset of features for security, but there are still ways to port and run games.In the case of DoomPDF, Ading2210 explains that C code was compiled to run inside a PDF using an “old version of Emscripten that targets asm.js instead of WebAssembly.” This means the code can run in the limited JS environment of a browser PDF engine. Inputs are sensed via the Chromium PDF engine’s support for text fields and buttons, with movement, map, and weapons controls all present. Nevertheless, implementing this doomgeneric source port involved some visual and framebuffer challenges.(Image credit: Future)In our screenshot, taken shortly after firing up DoomPDF, the PDF renderer’s visuals are moderately detailed but suffer from low color depth and a lack of contrast. The developer explains that previous PDF games have used more straightforward individual text fields that can be toggled on and off to create individual pixels. However, 320 x 200 pixels would require the rapid toggling control of 64,000 such fields, which is said to have been infeasible.Instead of text field boxes for pixels, Ading2210 used a separate text field for each row in the game screen with ASCII characters used to create six grey shades. This rendering method’s performance is claimed to be playable at around 80ms per frame (approx. 12.5 FPS).DoomPDF is free software licensed under the GNU GPL v2. Doom has infamously been ported to many weird and wonderful devices/platforms, including lawnmowers, air hockey tables, keyboard keycaps, and even Notepad.Get Tom’s Hardware’s best news and in-depth reviews, straight to your inbox.