Global or sprites opacity?

Hi, I have a game idea in my mind but for that I need to know if there is a way to set opacity values to sprites or to global game. My idea is that day is falling and night is on the way so I need the game gets darker and darker with hours, from total clarity to low vision.
¿Is that possible in any way? I tested maks but is not a good solution for this idea.
Thanks so much.

Since Playdate has 1-bit graphics, the notion of partial opacity is…. tricky :slightly_smiling_face:

The closest thing to what you’re looking for is drawFaded. It will essentially use a dither mask on the given image.

A sprite has a resulting image, either through setImage or by having its draw function draw into an image. You can then use drawFaded with those.

Note that this function will be very demanding on the hardware. It’s perhaps possible to get a smooth animation through it, but it would take some work.


Thanks so much, I am going to test that solution.