Aaron Starling

Aaron Starling

@shipmeto.space

Software Engineer. I can turn any topic into an expensive hobby.

36 followers25 following82 posts

PDF is a valid game engine

ading.dev@ading.dev

I made a Doom source port that runs within a PDF file. PDFs support Javascript, so Emscripten is used to compile Doom to asm.js, which is then run within the PDF engine. Input/output is done by manipulating text input fields. doompdf.pages.dev/doom.pdf github.com/ading2210/do...

Not only is it more performant but we also get bounds checking with the at() method! Very easy way to make your code less error prone and cleaner with a simple switch from length-1.

You can now use arr.at(-1) to get the last element of an array in JavaScript. This beats arr[arr.length-1]. But I think the index of the last element should be -0 😁

You are up to date.