thacuber2a03 / BlockDate

A random tetrimino game made for the Playdate console.
124 stars 11 forks source link

Optimize grid and UI rendering #16

Closed symphonite closed 2 years ago

symphonite commented 2 years ago

This moves inert grid rendering into a separate image that redraws only when the inert grid changes. Otherwise it'll just use the existing image. Additionally, the info UI now only updates when they are in a state where they might actually change. Lastly, don't redraw on moves/rotates if the active piece can't actually move or rotate into the new position. On device this now has a rock solid 30 FPS through all of gameplay.

thacuber2a03 commented 2 years ago

Amazing :)