If you want to see a variation of this concept in the wild, in active use by lots of people, check out PICO-8 cartidges.
PICO-8 is a virtual game console. I.e. it's an emulator for an oldschool game console that doesn't exist in reality. It's designed to be easy to code for while maintaining the limits and aesthetics of old game computers
PICO-8 games are, of course, distributed on cartridges. However because it's a virtual console, the cartridges are virtual too: they're PNG files.
Press the play button the play a game right inside the web browser, but be sure to click the little "Cart" link right below the playing area to see what's going on. You'll see it open a little PNG file.
That PNG file is the cartridge. It contains the entire game.
The file format is explained here: https://pico-8.fandom.com/wiki/P8PNGFileFormat. Obviously, because PICO-8 carts are purely digital, the format doesn't need any of the contrast, the error correction features or the orientation markers that QR-codes have. You can't take a picture of a cart with your phone and play it. You need the exact same, byte-for-byte PNG file. But it's still super cool.
Steganography is cooler for sure, but can't PNGs already store arbitrary data in the header? IIRC, the game Spore did that so you can exchange creatures by sending images.
This is very cool, and gives me a thought, what if you did it without "cheating"? That is, what if the whole game including its rules were in the picture? Something like Conway's game of Life but less shape-dependent, maybe utilizing the color to generate behaviors.
Nintendo back in 2001 came out with the e-Reader that would plug into a Gameboy Advance and read cards with data printed on them. You'd have to scan a few "stripes" of data, but it there were several NES games that you could run if you had the right cards. The cards held the data for the games, rather than them being already on the cartridge https://en.wikipedia.org/wiki/Nintendo_e-Reader
You should turn this comment into a blog post. Your writing is captivating. You made this ecosystem sound a lot cooler than the web pages you linked to.
That said, I think the PICO-8 ecosystem is a lot cooler than I made it sound :-)
EDIT, try watching this demo for example: https://www.youtube.com/watch?v=UR3MXKIefAI It's a demo, not a game, so not interactive and hence youtubeable. Tell me that isn't cool (and remember, it fits in is cartridge png).
I don't know if I'm stupid, but those anyone have an example PICO-8 PNG? I can't find one in either of the two links you sent, nor on the internet. Am i missing something here?
Huh, so the PNG actually looks like a real cartridge? How are they able to do that? Is the data section hidden in a non-visible part of the file, or are they able to somehow encode it in there while still having it look visually like a cartridge?
The images are RGBA PNGs. So for each display pixel there's a byte for each color channel and the alpha channel. The two least significant bits in each byte are a quarter of a PICO-8 data byte. Those bits are read from a channel byte and concatenated in RGBA order to get a data byte.
Using the LSBs for each channel means the those swizzled bits won't contribute very much to that pixel's color value. At worst it would just look like noise in the image.
Also by putting the data inside the image data of a PNG it won't be stripped off by some optimizer or hosting service.
This was the first thing that came to mind. If PICO-8 ever comes out with a mobile version, having a way to load a game by QR Code or some sort of game image would be cool.
Cool, so all the 1k demos/intros from Assembly (https://archive.assembly.org/2019/1k-intro) could also be distributed via QR code... the 4k intros unfortunately not. Maybe it's time for a new category ;)
The most interesting applications I've seen of QR-codes have been the most wildly impractical or useless.
When I still used my Pebble watch, my favorite watch face was just a QR-code of the time. So to tell what time it is, you have to scan your watch with your phone.
The point is to not rely on a server to host anything though. That the QR contains the data itself, not just a URL pointing to the data. Otherwise it is no different from any other QR code that has a URL in it.
The suggestion, I think, is to put the code in the URL itself, not use the URL as a pointer.
You could probably use a data: URL to avoid needing a server at all, but if not, the server would just provide a launcher and not host the application code.
Yeah, let’s make it even easier for people to run random executables that cannot be vetted, preferably on devices tightly coupled to their identities. What could go wrong?
Yeah I'd much prefer it be a javascript: URL that did all the magic in the browser. Much safer, cross platform, and it would probably work out of the box in existing QR reader apps.
YOU could perhaps, but your average target hasn't much of a clue what a VM is, let alone how to set one up.
And keep in mind, malicious software is going to be challenging, and there are much more clever ways to use QR codes.
E.g., imagine some store that has QR codes on the product aisles to access information on a product via a URL. I make a fake website that spoofs the legit product page, but offers the user a special "Buy online and save 25%" offer, which of course they are very tempted by due to the steep discount.
Apple has something like this for their new iOS device setup. I don’t think it’s to encode larger amounts of data, but for security they have this circle that constantly changes shape (see around 0:50 in this video for a demo: https://youtu.be/iE03ypWD5xs). I don’t know for sure how it works, but my first thought was a constantly changing QR-like code.
Wait, you found a snake? I am confused. Anyways, I too looked for it at first because I expected the game to be visually embedded in the QR code as well. I was a little disappointed that it was not the case. Imagine a game embedded in the QR code that when you load it, either directly is able to reconstruct the QR visual itself, so like some sort of quine https://en.m.wikipedia.org/wiki/Quine_(computing) but with the visual QR being considered the “source” kind of in this case and the thing bring output. Or weaker but still cool if the game uses the camera to load a QR and then you play on it.
Thinking about it a bit more it could be like the PICO-8 mentioned elsewhere ITT but instead of a PNG the QR fantasy console would work by loading programs from QR and initializing the display with the QR visual itself and then the code from the QR is exectuted and is able to access the “video memory” to read in the starting state and then you can play a game where you consume the QR visuals for example with snake. Probably needs to make the snake colored so that you can tell eatable QR visuals apart from your snake. Other games include Breakout and perhaps Pong. Frogger. Etc etc
I nearly started looking for it - thinking of the SIRDS images that were popular year ago - until I noticed the position markers. It's almost like we're trained in memes...
I was thinking about the same thing! Although the original QR code spec did allow binary payloads[1], smartphones and cameras weren't ubiquitous in mid 90s. But they are now. Transmitting computer virus or malware within the QR code binary payload might just be as easy as pointing your camera lens to the QR code. Since the QR code image is only machine readable not human readable, it would be indistinguishable, neither any digital signature to prevent it from being altered.
Initially I was looking at the QR-code and thinking about punchcards, code golf and javascript, but reading that it contains a Windows executable was a surprise.
PICO-8 is a virtual game console. I.e. it's an emulator for an oldschool game console that doesn't exist in reality. It's designed to be easy to code for while maintaining the limits and aesthetics of old game computers
PICO-8 games are, of course, distributed on cartridges. However because it's a virtual console, the cartridges are virtual too: they're PNG files.
Try browsing PICO-8 games here: https://www.lexaloffle.com/bbs/?sub=2&cat=7
Press the play button the play a game right inside the web browser, but be sure to click the little "Cart" link right below the playing area to see what's going on. You'll see it open a little PNG file.
That PNG file is the cartridge. It contains the entire game.
The file format is explained here: https://pico-8.fandom.com/wiki/P8PNGFileFormat. Obviously, because PICO-8 carts are purely digital, the format doesn't need any of the contrast, the error correction features or the orientation markers that QR-codes have. You can't take a picture of a cart with your phone and play it. You need the exact same, byte-for-byte PNG file. But it's still super cool.