I am doing something a bit unconventional, I think, and am running into an issue that I cannot seem to solve. I've created a little library to use the Playdate simulator to act as a "rendering engine" to create animations for myself to reuse in my Playdate games. This allows me to, among other things, pre-render particles and sprite rotations.
The way I've gone about this is by capturing the contents of the screen over multiple update cycles using playdate.graphics.getWorkingImage
. I draw these screenshot onto new images of a certain size in order to crop them (using lockFocus
). Then, I write these cropped screenshots to my hard disk via playdate.datastore.writeImage
.
This frees up essential CPU cycles during gameplay by allowing me to use these images as imageTable animations, rather than executing the actual particle simulation.
The problem, though, is that I cannot get transparency to work. It seems from the documentation for playdate.datastore.writeImage
that GIF transparency is not supported. So I attempted to use the PDI format instead... but transparency is either not supported for this filetype or I am doing something wrong.
Any idea if PDI should support transparency in this case?
Any word on if GIF transparency will be supported sometime soon? Is it on the roadmap?
Are there any workarounds that come to mind - or ways to read in a file via playdate.datastore.readImage
that have transparent pixels? (Either PDI or GIF)