Introduction and Credits
First off this idea was inspired/stolen from a YouTube video by MattCK where he tries to make not just a simple HTML5 game on a QR code (which is far easier and what I have done) but a whole executable, it’s impressive, insightful and well worth checking out. Below is my game! Later in the post I will show you how to play it.
Data is an abstraction. It’s something that is taught and understood by anyone who’s learnt about Computer Science, but as a concept I don’t think we give it enough consideration, or maybe I’m alone in thinking how much we took it for granted. QR Codes are data, data can hold information that can be interpreted by a computer to make programs, including games! But lets break down what that actually means.
When I was young my dad showed me how to make a computer using a cereal box. I thought it was the most ridiculous thing I’d ever heard, but it totally worked! First you’d make data in the format the “computer” could compute, in this case it was pieces of cardboard with some that hang onto pegs and others trimmed so that the peg would not hold it. The computer itself was a box with labelled holes that you could stick a peg through. The pegs would hold the cards by certain holes, a simple sorting machine, but the simple machine could be used like a computer by catagorising information. Pulling out a peg that for “black” and “bird” might make a card labelled “magpie” fall while “panther” is still held by “mammal”. This is a very basic example but is a kind of computer and data for it. I really recommend this for kids as it demystifies how “magical” computers work, at least in one sense. Try it here.
Essentially you have the data and the computer that can interpret it. An Xbox game doesn’t work on a PS3, a card for a magpie isn’t understood by the PC. So storing a game on QR code isn’t surprising or really even impressive (except limitations with size) as the computer is the one doing most of the work, the data is just instructions spoken in the language of the computer. When MattCK calls one method “cheating” he neglects to mention that really the approach isn’t different, I suspect he knows this but was more looking for additional challenge. In his first try the data is HTML + JS encoded to text on a QR code, in the second it is binary for an executable for windows. Both are data just being interpreted by slightly different computers (or platforms, engines ect).
How to Play “Smol”#
Scan the above QR Code.
Paste the large amount of text into a blank html file, or save using a utility straight to an html file.
Open the file in any modern browser.
Alternatively, see the source here: https://github.com/Pepperized/smol