Just want to make sure I'm not missing a trick before I do something moderately painstaking:
I was playing the Analogue Pocket's Spacewar! reproduction and it got me thinking the PDP-1's ultra-high-persistence phosphor -- like 2 seconds to fully fade -- might actually look cool on the Playdate. I did a bit of testing and it's surprisingly legible.
The test version is slow though, because it reassembles the whole phosphor trail from scratch every frame. What I'd hoped to do is maintain an 8-bit half-res grayscale bitmap of the whole screen to represent the phosphors, drawing copies of my sprites to the phosphor bitmap and fading that bitmap a little bit every frame, then dithering that out to screen. If I'm exceedingly clever, I might be able to manage dirty rects just for the places that the trails cross the dither pattern thresholds, but the other draw tasks are simple enough and the Playdate draws fast enough that I could probably spit the whole thing out every (or every other) frame.
Trouble is, while the Playdate APIs pass images through grayscale bitmap manipulation, they never expose those bitmaps to the caller, so I can't use successive passes of fadedImage() and blendWithImage() to assemble and maintain that phosphor map. So I think I need to just keep my own 200x120 table of bytes and update/render it out myself? As far as I can tell the only way to read/write images to/from my table is with image:drawPixel(x,y) and image:sample(x,y), which seems... well, it seems like a lot of calls, but I guess they're fast. Won't be too miserable as long as drawPixel treats dither patterns as the "current color", but it would certainly be nice to be able to treat bitmaps as tables and vice versa now and then.
This all seems sensible enough and somewhat tractable, but it feels a little bit too difficult for things that I'd think of as fairly basic image manipulation. Is there a better way that I'm missing?
(I saw librif, but that doesn't look like you can draw to the grayscale bitmaps, just render existing ones out with transformations.)
In case you haven't seen the PDP-1's awesome display, this is a real nice demo: