I am working on a game using the Playdate SDK; and I have noticed some performance issues; particularly when there are a lot of draw calls on the screen.
I understand that the Playdate screen refreshes at a certain rate; but I am unsure how to efficiently manage draw calls to keep the game running smoothly.
What are the best practices for handling screen refresh rates and optimizing draw calls in the Playdate SDK?
I have referred to the forum SDK Get Help section but still need help.
Are there any specific techniques ; code examples that can help reduce unnecessary redraws / improve rendering efficiency?
You can use the Sampler window to see exactly which of your draws are the problem. It does your the line of code. Let us know!
There are some things that are very slow on device, like rotating, that you should cache or otherwise do ahead of time.
In fact it's recommended to bake as much as possible into images that can be loaded quickly and drawn simply.
You might consider doing as little drawing as possible every update. Obviously exactly how you go about this will differ per game.
Default refresh rate is 30 and can be increased to 50 or decreased to 1. You can also set it to 0 to remove the limit and your game will do the next frame without any waits.
This is all a bit vague, intentionally, but hopefully it gives you some places to start.
Let us know the results of using the Sampler window.