Earlier quoted context omitted.
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?
Click "Cart" on the bottom left of the BBS entries. E.g. on https://www.lexaloffle.com/bbs/?tid=29967 Takes you to https://www.lexaloffle.com/bbs/cposts/4/44467.p8.png
Snake in a QR Code
81–83 of 83 posts
Re: Snake in a QR Code
#82Earlier quoted context omitted.
Click "Cart" on the bottom left of the BBS entries. E.g. on https://www.lexaloffle.com/bbs/?tid=29967 Takes you to https://www.lexaloffle.com/bbs/cposts/4/44467.p8.png
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.
Re: Snake in a QR Code
#83If 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…
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