Look at scale() in the reference
Use it before drawing the dungeon
Use translate to place the dungeon in the center
This is what I’m playing with:
this is not saving the png at 2 times the zoom, it is saving at normal zoom
Huh, it seems to work in this simple sketch:
click to save
I don’t think you need to zoom in to get your square section saved. I would use the get() function to get a specific section of your canvas and load this section into a PGraphics object. The final step is to save this PGraphics using save() as describe in the reference.
You can keep the size of the PGraphics (ok in p5js is the object return by createGraphics() function) to be the same dimensions as the ones used for the
get() function. If you wanted to have a zoom in effect, you can increase the dimension of the PGraphics before you load the image there.