Hey Aeneas Nin !
Further to your comment about “faking the GIF effect” in P8, I have been thinking for a long time how I can workaround this issue. I’m glad to tell you that I now have a solution as “P8 code” ! (along with the existing feature which creates GIFs)
Latest version now produces Pico8 lua code (in __lua__ section of the p8 file) which integrates a small program to display the image on Pico8 screen. This includes a list of “changing pixels” calculated by ImageToPico8 and then drawn on Pico8 side. The rendering of these innerstate noise pixels simulates the animation of the image.
In my first experiments, I was storing pixels as {x,y} coordinates. Then, I decided to store only the address (number between 0 and 16384 for a 128x128 screen) to save 50% of the tokens. Finally, what is ultimately stored are the differences between the current address and the previous address, thus saving some bytes.
This new feature takes “87+n” tokens: one token for each “changing pixel” you want to draw (“n”) and 87 tokens for the built-in program itself.
- You can adjust the number of tokens to allocate in your final p8 file (with the option -noisetokensNNNN : Allocate NNNN tokens of Pico-8 code) default is 2000 tokens = 1913 pixels.
- You can remove comments in Pico-8 code to reduce byte size (“--” keywords) with option -nocommentsp8
I would love to have your feedback on this update. If you like it, the RT of this tweet
would be much appreciated ! Thanks ! :)