There’s a global community dedicated to finding new ways to challenge themselves in Tetris, from speedruning the classic puzzler to technically “beating” it. But the latest feat isn’t a newly discovered hidden glitch or high score—it’s an entirely new way to play the game.
Thomas Rinsma, a security analyst and hobbyist tinkerer, recently figured out how to create a version of Tetris that runs inside a PDF file. According to a personal website post subsequently highlighted by BoingBoing on January 15th, Rinsma tackled the project “just for fun” after learning the potential implementations of PDF’s JavaScript API. The result is a novel version Rinsma calls PDFTRIS.
“[I] realized there just might be enough I/O possibility there for a game,” he wrote. “I/O” stands for “Input/Output,” and refers to the communication between a computer and its users.
Rinsma explained that it’s already “relatively well-known” that PDFs can support a number of features such as dynamic content scripting when opened in something like Adobe Acrobat/Reader. Some of that same scripting support, however, is also available in both Mozilla Firefox and Google Chromium’s respective PDF readers, PDF.js and PDFium.
[ Related: Is Tetris infinite? Teen world champ reaches fabled ‘rebirth’ ]
It gets a bit complex to the layperson from there, but regardless, the end result is a PDF containing a 10×20 grid of field buttons. These alternate between shaded and empty blocks depending on the JavaScript input, allowing a player to use preprogrammed keyboard instructions to move and shift the tetronimoes—the official te