Transition optimization and documentation fixes #92
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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).