TO LOAD THIS Pico-8 cart in immediate mode type:
load #gf |
You know how you see something somewhere and you tell yourself, that's pretty neat. I wonder if I can do that.
Well this is an actual classic example of that. I was looking at @LoveDan's interesting frame which appears and disappears:
https://www.lexaloffle.com/bbs/?tid=36564
Well I thought it might be interesting the way I do it, with a kind of sizzle sparkling line that moves over it like a mirror's light. Like a Star Trek transporter or Phaser disintegration.
The demo is a bunch of bouncing balls to show it really does run in the background and uses standard _DRAW() and _UPDATE() functions. Does not write to sprite area so you can animate sprites and stuff while it's running.
- Press (O) to make the first text appear.
- Press (X) to make the second text appear.
- Press UP to clear the frame instantly.
- Press RIGHT to start the frame's animation over.
- Press LEFT to make it sparkle and disappear.
So if I understand correctly, it draws the box to the graphics buffer during the UPDATE pass, and then copies all the pixels into Lua memory?
Then once the pixels are in a giant Lua object they can be copied back, one at a time, to the draw buffer during the DRAW pass?
I have to read that carefully, @apLundell. Yep. This will only work on those _DRAW() carts where you redraw the screen each time.
Use opening arguments:
x=-1 ... center x x=-2 ... right-justify x y=-1 ... center y y=-2 ... right-justify y |
Otherwise X & Y coordinates are top-left corner. Can change border too, stored in sprites as 4x6 images.
I was sorely tempted to stuff it in the sprite buffer but this way you can still use your sprites in the background.
As I'm coding in both Pico-8 and Blitz now I think it's pretty nifty so I'll do something similar to this for Blitz but with true alpha smearing and animated rotation sparkles.
[Please log in to post a comment]