Skip to content

Conversation

Alanaktion
Copy link

Thanks for making this neat li'l engine! It really makes a lot of the initial game dev tasks much easier and I love working with it. I have two small transition-related changes:

Update old TransitionType references

The old TransitionType documentation was still used in a couple of places, so I updated it to reference the new transitions. Also possibly worth changing is that the TransitionType docs page still exists but is not linked to and no longer relevant.

Optimizing transitions with tiled dithers

Based on the Playdate SDK example fast_fade.lua implementation, I've updated some of the transitions to use tiled dithers and image masks where possible to improve performance. It uses a tiled mask image for CrossDissolve, and adds a new DipTile that draws a tiled dither pattern rather than a full-screen dither. Updates DipToBlack and DipToWhite to use DipTile. The pattern images used for dithers are 8x8 to allow the larger SDK dither types to tile correctly, but could potentially be a teeny bit faster at 4x4 for the default dips.

For DipTile the max frame rate on hardware improves by 68% compared to Dip, and for CrossDissolve by 59% compared to full-screen drawFaded. Both are noticeably smoother when running games at the SDK default of 30 FPS, and no longer drop below that frame rate unless other expensive computation is happening during the transition. Tested on launch hardware (PDU-Y-01).

Uses mask image for CrossDissolve, and adds a new DipTile that draws a tiled dither pattern rather than a full-screen dither. Updates DipToBlack and DipToWhite to use DipTile.

For DipTile the max frame rate on hardware improves by 68%, and for CrossDissolve by 59%. Both are noticeably smoother when running games at the SDK default of 30 FPS, and no longer drop below that frame rate unless other expensive computation is happening during the transition. Tested on launch hardware (PDU-Y-01).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant