Breakout implemented in JavaScript in a PDF
rawgit.com
rawgit.com
This is horrifying. Why would you ever want to cover this functionality in a read-only document format specification...
"Granted, most PDF readers (besides Adobe Reader) don't implement most of this stuff. But Chrome does implement JavaScript! If you open a PDF file like this one in Chrome, it will run the scripts."
https://github.com/osnr/horrifying-pdf-experiments
Doesn't work in Firefox for me. Try in Chrome if this is all you see on the first page.
Move your mouse down here!
also, README below...Read in browser: "Party agrees to pay twenty dollars for blues lessons."
Printed version: "Party agrees to pay HIS ETERNAL SOUL to learn to play the blues HAHAHA"
No, it's not. I mean, print fidelity is where it excels, but that's not all it does. PDF Reflow, for instance, is a designed-in feature.
I am thinking about the difference when rendered ("distilled") into PDF. Hmm. I should test this...
[1] https://www.alchemistowl.org/pocorgtfo/I love this, it's hacking for hacking's sake.
but out of all of the weird stuff in the pdf spec (which is terrible) javascript has got to be the worst.
even the attempts at restricting stuff to make a saner version (PDF/a) eventually devolve into allowing all the crud back in.
Atari sought him out for this as Steve Wozniak had made a viable version of Pong by reducing the chip count. Although he did a splendid job of getting the chip count minimised for Breakout this design was not good for production so Atari did their own board design but the game played the same, as per Steve Wozniak's version:
https://en.wikipedia.org/wiki/Breakout_(video_game)
I wonder if the Steve Wozniak version has better gameplay than this JS in PDF hack?
Either way it is in the same spirit, the point of Breakout is more about optimising the game to available resources - 'hacking' - than playing the game.
(Though probably it probably is a security hole)
http://www.math.uakron.edu/~dpstory/acrotex.html
including Battleship:
http://www.math.uakron.edu/~dpstory/tutorial/games/navbat.pd...
and Tic-Tac-Toe:
I have the acrobat/JavaScript API Ref open right now. [0]
[0]https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdf... for those interested.
http://khkonsulting.com/2016/06/getting-serial-number-form-u...
Basically, the backend is a SOAP server and the PDF is the client.
So, xml and wsdl, no json.
Great write up though. Appreciated.
What grinds my gears is that the game is broken. Lives go negative, boundary check only checks for zero.. such stuff.