I'm making a sidescroller and I'm using the DrawingCanvas as part of a levelMap feature. Basically, the DrawingCanvas is the size of the layout, overlays the layout, is invisible, and is initially all black. As the main character moves, the area around the mc is 'erased' in the DrawingCanvas. When the player opens the levelMap, they'll see the entire layout zoomed out, with the DrawingCanvas (now visible) on top. So they'll only see the parts of the layout where the mc has been, because those areas have been erased in the DrawingCanvas.
This works great, but I need to save the DrawingCanvas for savegames. Because my layout is so large - 22k x 11k pixels - saving the DrawingCanvas to LocalStorage takes 5+ seconds. I'd like to reduce that savetime. FYI I'm using this save approach, Thanks dop2000 ! - construct.net/en/forum/construct-3/how-do-i-8/save-current-state-163694
Since I don't need a very high-quality image in the DrawingCanvas, is it possible to downscale the DrawingCanvas to maybe 10% of the size, and then save it to LocalStorage? Of course this means I would need to upscale it when reloading the savegame? If so, how would I do that? ChatGPT gave some suggestions but she's hallucinating somewhat and sending me down ratholes.
Any other options? Is there a way to start with a smaller DrawingCanvas, and clear areas of it based on a layoutSize-to-DrawingCanvasSize calculation of some sort? I would then have to expand/resize the DrawingCanvas when viewing the levelMap...
Or are there other ways to design such a levelMap that doesn't use a DrawingCanvas, maybe some other object type?
Thanks