I made a Doom source port that runs within a PDF file. Play it here: https://doompdf.pages.dev/doom.pdf The PDF file format supports Javascript with its own separate standard library. Modern browsers (Chromium, Firefox) implement this as part of their PDF engines. However, the APIs that are available in the browser are much more limited. It turns out that old versions of Emscripten can compile C to asm.js code that will happily run inside the limited JS runtime of the PDF engine. I used the doomgeneric (https://github.com/ozkl/doomgeneric) fork of the original Doom source, as that made writing the IO fairly easy. All I had to do was implement a framebuffer and keyboard inputs. Unlike previous interactive PDF demos, the output for DoomPDF is achieved by creating a text field for each row of pixels in the screen, then setting their contents to various ASCII characters. This gives me a 6 color monochrome display, that can be updated reasonably quickly (80ms per frame). The source code is available at: https://github.com/ading2210/doompdf Note that this PDF can only run in Chromium-based browsers that use the PDFium engine.
Der Egoshooter Doom läuft einfach überall, sogar auf Taschenrechnern, aber in einer PDF-Datei?! Das hat mich doch ein bisschen überrascht. www.youtube.com/watch?v=g6yg...
https://youtu.be/g6ygXHmtHzs?si=h6zgVWM4w1XBajN4
You may also like
Powered by
(but not affiliated with)
Created by mjd.dev