If I may offer some suggestions.
- Draw directly to the canvas graphics, the macOS now uses triple buffering, one for the screen, one for the window and one for the view. Buffering yourself is offers little improvement.
- Disable anti-aliasing.
- Make sure that your “tiles” are pixel perfect and don’t need to be scaled.
- 15 years ago we used CGLayers for this as they’re editable pictures on the graphics card, drawing a CGLayer took < 100 microseconds, sadly they got broke with 10.10 and finally deprecated. Supposedly they can be replicated with CALayers, but I’ve never tried.
- On macOS there are two ways how you can tile a single image across an entire view, if a majority of your map is the same, consider these methods and then drawing t’other tiles.
- Use the Nintendo way of scrolling the map, i.e. change page when the character moves from one page to next, but while they’re on the page, only update the tiles that are affected by the character.
- Don’t start a project using OpenGL, it’s deprecated on macOS and is broken in some places with 10.14. I wouldn’t suggest using Metal as it still has teething issues.
- If you’re looking at Mac Only, consider sprite kit.
- Older versions of the macOS had an option to disable buffering, so you could render directly to the screen, this would improve performance, but I don’t think that it’s available any more.