Alright, so say I have 2 128x128 images, and I've got one saved to the spritesheet and one saved on the cart's label image. Is there any way to do something like use reload() to take the data from the label image and put it on the spritesheet?
Other solutions are welcome too. The final goal is to have a cutscene cart (for a multicart game) of 2 animated images (one character breathing heavily which cuts to the other trailing blood as he slides down a wall). I have successfully used reload from another cart, but I worry this would cause it to freeze/load in between the cuts of the cutscene.
One other thing I've attempted is pasting the whole image in a string and poking it to memory in a for() loop, which almost works (and it would be nice if I could get this to work, cos it could allow me to animate a character's mouth or something).
My attempt at using poke() to overwrite the second image onto the spritesheet:
Nicely done, @JadeLombax. I had forgotten it overwrites the sprite area. Here is update so the data goes straight to screen without touching the sprites - w thanks.
To load this in Pico-8, type:
Ok, sweet! I got your method to work (after figuring out that the in the spr2clip function, the tostr needed to have the second param be true, not 0).
I think I'll have both characters be in a string so that I can write to the spritesheet, and that way I can do things like animate more easily with smaller strings that store different images of a mouth or something.
And I'm not too concerned about size, since I decided to dedicate this whole cartridge to the cutscene anyway (it's a single, end-game sorta thing).
Glad I could help, @Maeve ! :)
If you get stuck lemme know and I'll write you a skeleton code that has your two pictures in there.
I also wrote code after that which does true compression and while the interface and simplicity of use is the same as this, the strings come out smaller in size.
[Please log in to post a comment]