logo80lv
Articlesclick_arrow
Research
Talentsclick_arrow
Events
Workshops
Aboutclick_arrow
profile_loginLogIn

You Can Now Run DOOM In A PDF File

Play it in your browser.

It's a well-known fact: if it has a screen, DOOM can be played on it. Pregnancy testsBlender's Geometry NodesWindows' NotepadLEGO bricksa hacking conference attendee badge, quantum computers, the list continues endlessly, with no limits to the developers' creativity. But what about text?

There's another kind of competition in the PDF file format world, and this time, GitHub user Ading2210 has successfully combined the classic first-person shooter with the document format, allowing you to play it in Chromium-based browsers that use the PDFium engine.

Ading2210

Ading2210

The PDF file format supports JavaScript through its own separate standard library, which is implemented by modern browsers like Chromium and Firefox as part of their PDF engines. However, the APIs available in the browser environment are significantly more limited. 

Apparently, older versions of Emscripten can compile C code to asm.js, which runs smoothly within the constrained JavaScript runtime of the PDF engine. Ading2210 used the doomgeneric fork of the original DOOM source for this project, as it simplified the process of handling input/output, and all they had to do was implement a framebuffer and keyboard inputs.

As the developer explained, unlike previous interactive PDF demos, DoomPDF achieves its output by creating a text field for each row of pixels on the screen and setting their contents to various ASCII characters. This approach results in a 6-color monochrome display that can be updated at a reasonably quick rate of 80ms per frame.

Play DoomPDF here and check out the source code on GitHub. Ading2210 is a talented high school student with a passion for programming who previously shared another fun project, running the Bad Apple!! music video on the GitHub Contributions Graph:

Don't forget to join our 80 Level Talent platform and our new Discord server, follow us on InstagramTwitterLinkedInTelegramTikTok, and Threads, where we share breakdowns, the latest news, awesome artworks, and more.

Error
(2000-0001)

Join discussion

Comments 0

    You might also like

    A Week After "Basically Announcing" Minecraft 2, Notch Basically Cancels It

    Instead, he and his team will focus on the previously-announced retro-style roguelike.

    Rumor: Possible Release Date for Grand Theft Auto 6 Revealed

    A video game store from Uruguay appears to have disclosed the launch date for the gaming industry's most anticipated title.

    Breaking: Unity Suddenly Lays Off Numerous Developers With a 5 AM Email

    Apparently, the entire Unity Behavior team was cut, alongside many other employees.
    • Camping and Outdoor Props
      by Dekogon

      This project includes assets, maps, materials, Blueprints, and effects created in the Unreal Engine. Each asset was created for realistic AAA quality visuals, style, and budget.

      Error
      (2000-0001)
    • 150+ Hard Surface Prop Alphas
      by Mels Mneyan

      Error
      (2000-0001)

    We need your consent

    We use cookies on this website to make your browsing experience better. By using the site you agree to our use of cookies.Learn more

    ×