Live data from Hacker News

Snake in a QR Code

itsmattkc.com

11–20 of 83 posts

Re: Snake in a QR Code

#11
post #8

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 ;)

Could you plausibly make it a URL where the code in the URL is assembled and run using webassembly?

Re: Snake in a QR Code

#12
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.

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.

Re: Snake in a QR Code

#13
post #8

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 ;)

> https://archive.assembly.org/2019/1k-intro

Had to add a security exception only to receive

    404 Not Found
    nginx/1.18.0
:/

Re: Snake in a QR Code

#15
post #8

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 ;)

Could you plausibly make it a URL where the code in the URL is assembled and run using webassembly?

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.

Re: Snake in a QR Code

#17

I was looking for the snake in the QR code itself (and found it!) before reading the article

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.

Re: Snake in a QR Code

#19

I was looking for the snake in the QR code itself (and found it!) before reading the article

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…

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

Re: Snake in a QR Code

#20
post #13
post #8

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 ;)

> https://archive.assembly.org/2019/1k-intro Had to add a security exception only to receive 404 Not Found nginx/1.18.0 :/

You can find the prod executables on https://files.scene.org/browse/parties/2019/assembly19/1k and the placement list and Youtube captures (many prods require quite a hefty GPU to run so YT is the option if you're on a weaker laptop) via http://www.pouet.net/party.php?which=7&when=2019
Post reply on HN