Let's say I have a 2D game world that is 1000 meters x 1000 meters and I want to display a 100 meter x 100 meter portion of the world on the screen in 1920x1080 resolution. I'm having trouble understanding how aspect ratio factors into changing between world, camera and screen/backbuffer coordinate systems. I'm also confused on the calculations necessary to "zoom out" the camera to see a larger portion of the world.
Here is my thought process:
My basis for the world would be u = [1, 0], v = [0, 1], origin = [0, 0].
Let's say that the camera is currently centered at the world origin and it has the same basis as the world.
This means that I have different values for pixels/meter for the width and the height, but I don't think that is correct.
Specifically, widthPixelsPerMeter = 1920/100 and heightPixelsPerMeter = 1080/100
The basis for the screen would be u = [widthPixelsPerMeter, 0], v = [0, -heightPixelsPerMeter], origin = [-50, 50].
Do I need to do something with the aspect ratio here so that pixels/meter is consistent for the width and the height?
If I wanted to "zoom out" the camera so that the player could see a 200 meter x 200 meter portion of the world, would I change the camera basis to be u = [1/2, 0], v=[0, 1/2], origin = [0, 0]. Is that correct?
Thanks in advance for the help. I've only gotten through the first 130 days and I had particular trouble following how this part of rendering was set up.