Resize window while keeping objects in center

Recently, I’ve been making a game that allows you to resize the display. The trouble is that the actual play area is a fixed size, and it has to stay in the center. I could move the actual gameplay to another location and use the sprite snapshot plugin and a lot of math to calculate offsets for the drag-and-drop portion of the game, but it would be very complicated and inefficient. I believe that a setting for the width and height resize modes to keep the scene in the center at all times (the developer-set region specified in the game properties) would benefit many people. If this is hard to address, then an option to change the border color or use a 9-patch for the border would still solve this problem. Thank you for reading!

Your scenario doesn’t quite make sense as described.

Which of these are you wanting? (Or do you have an example game somewhere that does what you want?)

  1. Are you wanting the game to scale when the window is resized? (This is fixed size)
  2. Are you wanting the visible game space to change when the window is resized? (This is adaptive game size)
  3. Are you wanting the window to scale but the actual graphics to stay the same (no scaling but empty space around the gameplay area even if the window gets bigger)

I have an example game that shows what it might look like.