I've made an algorithm that allows you to store 4 1-bit sprites in the space of a normal pico-8 sprite.
This version uses up the cpu a lot less compared to the previous which used pset().
It could be a little hard to use so there's some help on the bottom of this page.
Special thanks to Heracleum#1208 on discord for helping with the code.
Documentation:
Use 4x more sprite memory if your sprites are 1-bit
16 colors / 2 colors
1 sprite / 4 sprites
256 sprites / 1024 sprites
To draw your sprites, you'll have to use specific colors
Each color marks different sprites from 1-4, some of them mark more at once:
Pixel color in spritesheet/which sprites will be marked by color in that spot
0/none
1/1
2/2
3/3
4/4
5/1,2
6/1,3
7/1,4
8/2,3
9/2,4
10/3,4
11/2,3,4
12/1,3,4
13/1,2,4
14/1,2,3
15/1,2,3,4
![](/gfx/set_like0.png)
![](/gfx/top_drop.png)
![](/media/66501/3_682398-B50.png)
As discussed in Discord, I liked @Laz's idea and I love 8-bit monochrome gfx (good old ZXSpectrum/C=64 days), pretty sure I'll use this soon for big titles, intro/splash screen etc...
So here's my implementation on the 1spr=4monochrome spr idea.
Other than the demo code, the cart contains 2 main functions: PXPACK and MONOSPR
- PXPACK to pick 4 tiles from the current spritesheet, pack them into one and copy GFX data to Clipboard (so you can paste it in your other game cart)
- MONOSPR to actually draw one of the 4 tiles as monochrome sprite 8x8, in the specified colour and optionally a background color (otherwise it will be transparent)
Read more details in the function descriptions
Note: it uses a different mapping than Laz's table; to avoid a conversion table, it simply uses a bitmask where colour 1=1, 1=2, 3=4, 4=8, plain Binary, so it relies on the bitwise OR "|" operator to pack the values for you.
I know peeps would think "well there's PX9 and it keeps all 16 colours" but it's a different concept here. You could REUSE some tiles several times to even fill the entire screen and have the basic spritesheet only occupy a few tiles.
The intent here is to take advantage of single monochrome tiles to have graphics like this (also with the help of 8bit drawing sw like Multipaint):
[Please log in to post a comment]