Allen (ading2210 on GitHub) has created a port of the game DOOM which runs within an Adobe PDF file.
You might expect PDF files to only be comprised of static documents, but surprisingly, 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.
C code can be compiled to run within a PDF using and old version of Emscripten that targets asm.js instead of WebAssembly. Then, all that’s needed is a way to get key inputs, and a framebuffer for the output. Inputs are fairly straightforward, since Chromium’s PDF engine supports text fields and buttons. Getting a good looking and fast enough framebuffer is a lot more of a challenge though.
Instructions for gameplay are in the PDF file and the file may be obtained on the web here.
Have an amazing project to share? The Electronics Show and Tell is every Wednesday at 7:30pm ET! To join, head over to YouTube and check out the show’s live chat and our Discord!
Python for Microcontrollers – Adafruit Daily — Python on Microcontrollers Newsletter: A New Arduino MicroPython Package Manager, How-Tos and Much More! #CircuitPython #Python #micropython @ThePSF @Raspberry_Pi
EYE on NPI – Adafruit Daily — EYE on NPI Maxim’s Himalaya uSLIC Step-Down Power Module #EyeOnNPI @maximintegrated @digikey