Doom, the legendary FPS game of the 90s, which was thought to have set the bar unreachable by running even on a calculator in the past, has surpassed itself by making it playable even in a PDF file. While the PDF format, which is normally designed for reading documents, is used for static documents, this time it has turned into an interactive gaming experience with a programming genius. This port, called DoomPDF, shows how a creative mind can work. Here are the details!
How was Doom ported to PDF?
DoomPDF is a port that uses PDF’s text fields and Javascript capabilities… The developer created a six-colour monochrome graphic of ASCII characters using a separate text field for each screen line. This method renders each frame in about 80 milliseconds and provides a remarkable, albeit low-performance, experience. With this method, the 320 x 200 resolution ‘Knee-Deep in the Dead’ episode of Doom can be played.
The developer states that compiling the C code in PDF, capturing key inputs and using a framebuffer was quite a challenging process. Nevertheless, this result proves that PDF can be used not only for documents but also for interactive content.
DoomPDF was inspired by a completely different project called ‘pdftris’, where you can play Tetris in PDF. The developer has even been congratulated by Thomas Rinsma, the creator of pdftris… Praising DoomPDF with the comment ‘Great job!’, Rinsma has once again shown that PDFs can offer much more than an ordinary document format.
Although running Doom in PDF reveals a programming genius, we should not forget the potential security risks of PDF files. The complexity of the PDF format is occasionally exploited by malware authors. For this reason, you should be especially careful when opening interactive PDF files that unexpectedly appear.
So, what do you think about making Doom playable in PDF? Should such innovative projects become more widespread? Don’t forget to share your opinions in the comments!