hotn-gay-digital-garden/twitter/tweets/9_26_2020.md
2026-02-15 21:39:13 -06:00

12 lines
No EOL
848 B
Markdown

{{{
"planted": "9/24/2020",
"repotted": "1/4/2026",
"nobreak": "true"
}}}
* 6 full, uncompressed spritesheets loaded into a single cartridge, being swapped per-frame at runtime with only 7% CPU usage at 30fps! #pico8
Explanation and code in BBS post: [https://lexaloffle.com/bbs/?tid=39745](https://lexaloffle.com/bbs/?tid=39745)
![](media/9_26_2020.gif)
*gardener's note: pico-8 has a single 128x128 16 color spritesheet typically available for use. If I remember correctly, it's packed into 4kb of data. I figured out how to pack that data into constant strings in the source code, then decompress it into Lua tables. Then, at runtime, I could simply load the table into the memory segment for the spritesheet and draw that. I used this in later game engines, and a similar technique is used in PooM for enemy and map textures*