Diamond Member Pelican Press 0 Posted 7 hours ago Diamond Member Share Posted 7 hours ago This is the hidden content, please Sign In or Sign Up Pdftris is a Tetris game inside a PDF which runs in any modern PC browser The classic Tetris game has been This is the hidden content, please Sign In or Sign Up and dubbed Pdftris. The classic falling blocks puzzler is claimed to be playable in most desktop browsers and, indeed, we successfully loaded and played the game in Firefox on PC simply by clicking the above link. A security analyst named Thomas Rinsma is the brains behind this new PDF-based browser game. Here’s a working game of Tetris inside a PDF. Even has keyboard controls (by typing WASD in an input box). Plus, upon game-over you can “save” your score by printing the page This is the hidden content, please Sign In or Sign Up work in most browsers (built for pdfium/PDF.js). pic. This is the hidden content, please Sign In or Sign Up .com/n4CPcitzz9 This is the hidden content, please Sign In or Sign Up Background details on the project aren’t extensive, as the GitHub project page ReadMe entry is empty. However, Rinsma was This is the hidden content, please Sign In or Sign Up with users on the Hacker News feed about the development project. Rinsma indicates that he was inspired to port a game to run in a PDF after he “realized that the PDF engines of modern desktop browsers ( This is the hidden content, please Sign In or Sign Up and This is the hidden content, please Sign In or Sign Up ) support JavaScript with enough I/O primitives to make a basic game like Tetris.” The security analyst and self-confessed aficionado of “strange loops and weird machines” also explained that it wasn’t that easy to get his Tetris game to run correctly in both engines. However, he discovered that “showing/hiding annotation ‘fields’ works well to make monochrome pixels.” Moreover, if you try the game with the on-screen buttons and would prefer to use keys, then Rinsma made it so that keyboard control can be achieved by typing in a text input box below the game area. Rinsma humbly admits that his Tetris in PDF code is “quite janky.” However, he suggests it at least serves as a reminder of the power and flexibility of PDF scripting. (Image credit: Future) Those interested in prying inside the Pdftris code don’t need specialist or esoteric development tools. Just choose to download the 60KB PDF, and open it in a text editor and you will find the file is “all ASCII.” There is some source code available, too, with greater readability and comments inserted. You can see that on the aforementioned GitHub project page, specifically This is the hidden content, please Sign In or Sign Up . Get Tom’s Hardware’s best news and in-depth reviews, straight to your inbox. Rinsma noted that Pdftris isn’t working on This is the hidden content, please Sign In or Sign Up ’s Reader “likely because it’s not compliant in several ways.” Other non-browser Pdftris possibilities like Foxit Reader might work, he mused, as he believes it supports the necessary scripting for the gaming action. It would be great to get some color, shading, and sound in a future release of Pdftris but we don’t know if this project will be developed much further. In some ways, it is basically a proof of concept. While Pdftris is certainly an eyebrow-raising mashup of the gaming and document rendering worlds, developers have dragged far duller apps into the gaming realm, particularly This is the hidden content, please Sign In or Sign Up Excel. This is the hidden content, please Sign In or Sign Up ’s spreadsheet can even host a 3D raytracing gaming engine (with the help of VBA). This is the hidden content, please Sign In or Sign Up #Pdftris #Tetris #game #PDF #runs #modern #browser This is the hidden content, please Sign In or Sign Up This is the hidden content, please Sign In or Sign Up Link to comment https://hopzone.eu/forums/topic/191986-pdftris-is-a-tetris-game-inside-a-pdf-which-runs-in-any-modern-pc-browser/ Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now