"Doom" runs as a PDF at 12 frames per second

Tireless programmers are constantly searching for platforms and devices to which "Doom" has not yet been ported. Now "Doom" has been converted to PDF.

listen Print view
Screenshot of "Doom" as PDF file

DoomPDF from the programmer ading2210

(Image: Screenshot heise online)

2 min. read

In separate projects, two programmers have succeeded in getting the classic shooter “Doom” to run as a PDF. The programmers ading2210 and Thomas Rinsma have ported “Doom” to PDF format in independent projects and published them in the last few days. The projects can be run in Chromium-based browsers and played in a rudimentary way.

Thomas Rinsma first had the idea of translating Tetris into PDF format. This inspired ading2210 – without knowing that Rinsma was also working on a “Doom” port at the same time. There is no bad blood because of this: “Great work!”, writes Risnma on Hacker News about ading2210's PDF “Doom”. The latter's solution is better overall, admits Rinsma.

The fact that a PDF file can be playable at all is due to the support for Javascript, explains ading2210 on GitHub. In principle, a lot is possible with this, but the APIs of modern browsers are very limited, which also imposes compromises on “Doom” gaming fun. On the one hand, the frame rate is low – each image takes 80 milliseconds, so the PDF version of “Doom” only displays 12.5 images in a complete second. Even the creator himself admits that there is another way to achieve a smooth experience.

In addition, the browser version of “Doom” does not show any red blood; the display is limited to six different shades of gray. This should be roughly sufficient to be able to recognize the screen content to some extent. The images are displayed via text fields for each row on the screen, the contents of which are filled with various ASCII characters. Switching an individual text field on and off for each pixel was not practicable with the “Doom” resolution of 320x200 pixels, writes ading2210. In this case, thousands of text fields would have had to be activated for each frame.

Videos by heise

The PDF-based version of “Doom” from ading2210 can be played either via the integrated input buttons or via the keyboard.

(dahe)

Don't miss any news – follow us on Facebook, LinkedIn or Mastodon.

This article was originally published in German. It was translated with technical assistance and editorially reviewed before publication.