Merry Christmas 2021 with 256-Colors

0
0
Published 2023-06-12


TO LOAD THIS PICO-8 CART in immediate mode type, load #trucolor256

VVhat's new ?

12/16/21
✅ Changed code so it will load any image, 3-bytes per pixel or 4-bytes per pixel such as images that include transparent layers. Thanks to @jo560hs for catching this error.
✅ Set the code to exit if you choose WEBSITE. No need for it to keep running.


[8x8]
From the lab of dw817 here is me wishing Happy Holidays to all of you. :)

Not only do you get a nice Christmas greeting in 256-colors, (you might need to squint a bit to remove the flicker), you can create your own 256-color pictures to add to your own Pico-8 games with the EXE tool I've included as well as some sample pictures to try on your own.

You can also import any PNGs or JPGs of any proportion or image size from your own collection or from the internet, my program will accept them all the same.

Once the filebox appears and you decide you want JPG, Press TAB and the down arrow key to change to view JPG images.

https://www.mediafire.com/file/i4ki5m561d1nkom/To256+(12-10-21).zip

To record your results you can save to the clipboard replacing the single line that contains your picture or save an entirely new Pico-8 program that features just the image you've put in it. No need to paste.

If you choose clipboard, once the code is run, go back to your Pico-8 code and press the following keys:

CTRL+P CTRL+V CTRL+P

Make certain you press CTRL+P twice. Once before and after CTRL+V. Then the image will be pasted properly.

Also this affects none of your sprites, mapper, SFX, or music. They are all untouched once the picture has been seen. This demo shows a box appear in the center at the end which is from the sprite worksheet to show nothing is affected.

The playback routine is also pretty small too at 186-tokens, and outside of the picture, no other code is needed.

If you get flicker, and you are using Firefox, shut it down completely and bring it back up. Apparently the timer is getting garbled somehow. I have received no flicker at all running it in the P8 system, however.

@zep ! Please add ability to play carts at 120fps =or= allow someone to plot 2-pixels in the same space merging the colors with the original. Doing so should remove the last of the flicker in this particular code.

If this cart becomes popular I'll consider adding to the converter the ability to edit the image in true-256 color fashion where you can fill in regions to match other colors so the direct conversion looks better as well as fine-tune editing - useful for real photographs which will almost always give trouble converting to 256-colors.

And there you have it !

As always if you have any questions, comments, or kerosene, please direct them below.

Merry Christmas !