I am trying to implement a tilemap like the one in the Lua SDK but for C. Aside from this question if anyone knows how that's actually implemented in C that would be a huge help. I started by just drawing every tile as a bitmap to the screen one at a time (only for the tiles within the dirty rectangle). I decided to try drawing them all to a bitmap instead using playdate->graphics->pushContext and then drawing that to the screen instead (lots of draws to the bitmap but only one to screen). This actually seemed to improve the performance but I'm not sure why. Is there some overhead involved when drawing a bitmap directly to the screen vs drawing it to another bitmap? I am doing all of the draw calls in the function I gave the sprite with playdate->sprite->setDrawFunction if that changes anything.