What I’m trying to do
- Generally scale and keep proportional virtual resolution area compared to window size
- Gameplay area stays in virtual resolution, UI floats only to virtual resolution size
- Fit virtual height to height of window
- If width is wider than window width then draw to the left and right and center virtual resolution area - I’ll have background textures and animations out there
- If width is wider than computed distance then draw black bars
- If width is equal to virtual width but height is tall then center virtual resolution vertically and draw a little extra background scene in case for super wide screen displays in portrait, and then after draw black bars above and below
This could be applied to landscape and portrait style layouts
Still working on it. Any tips welcome.