Log In  

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).

The images:

My attempt at using poke() to overwrite the second image onto the spritesheet:

Cart #helpexample1-1 | 2021-10-21 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

P#98995 2021-10-21 19:49 ( Edited 2021-10-21 19:58)

:: dw817
P#98998 2021-10-21 19:57
:: Maeve
1

@dw817
Thanks! I'll check it out

P#98999 2021-10-21 20:10
1

I made a system a while ago that should work well for this. The drawing function is pretty small and just takes 74 tokens, and it doesn't require using the spritesheet at all.

https://www.lexaloffle.com/bbs/?tid=38829

P#99002 2021-10-21 20:50
:: dw817
1

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.

Cart #rayokahiyu-0 | 2021-10-21 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

To load this in Pico-8, type:
LOAD #RAYOKAHIYU

P#99004 2021-10-21 21:19 ( Edited 2021-10-21 21:20)
:: Maeve

@dw817
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).

P#99006 2021-10-21 22:08
:: dw817

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.

P#99009 2021-10-21 22:32

[Please log in to post a comment]

Follow Lexaloffle:        
Generated 2021-12-05 20:37:30 | 0.058s | Q:25