Optimisation
When I built Shark Turtle in 2023 I was concerned about maintaining fast updates and animation, but was aware that most of the time the screen would be static. How to strike the right balance in performance?
Go Slow
My first solution was to come up with a dynamic frame rate system that gave me the best of both worlds:
- fast frame rate when animation is happening
- slow frame rate when the user is moving the cursor
This did work, but I abandoned it…for reasons I can’t remember.
Dirty Epic
Instead I manually keep track of the dirty status of the grid and score “HUD” areas of the screen, only redrawing each of them when they have actually changed. So, drawing is frequent drawing animations but if you don’t do anything literally nothing is drawn on the screen.
You can see this in the video above where updated screen areas are highlighted in translucent orange.
With more development time I could make the grid dirty tracking work in columns so that only the changed columns redraw, but it was not to be.
Why?
This all means the game uses very little power most of the time. I put time into optimisations like this because it makes for a better experience for players.
Get Shark Turtle for Playdate
Shark Turtle for Playdate
Fully featured version of SameGame for Playdate
Status | Released |
Author | gingerbeardman |
Genre | Puzzle |
Tags | Playdate, samegame |
More posts
- Now available for Mac and Windows!17 days ago
- Coming soon to Mac/PC/iPhone/Dreamcast25 days ago
- Scoring Formula31 days ago
- Fun Facts32 days ago
- Choons33 days ago
- Old Code, New Release38 days ago