Hello Guest

Author Topic: Supporting different aspect ratios in a split-screen mode  (Read 4368 times)

Doghelmer

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 20
    • View Profile
Supporting different aspect ratios in a split-screen mode
« on: May 10, 2016, 04:33:06 am »
I'm working on a game that includes a split-screen coop mode, and I'm currently working on support for resolutions that have different aspect ratios other than my game's standard 16:9.

Here's what the game looks like at 16:9


And unfortunately, here's the best I've been able to do for 4:3 resolution.


As you can see, the image is stretched vertically.  (You'd be able to see the same amount of the playfield as you do in the 16:9 screenshot, if I hadn't put in letterbox bars at the top and bottom.)

Here's are my cameras' current settings:


I've tried doing this a bunch of different ways to no avail:
- Setting the Normalized View height to something lower like 0.8: This shrinks the view, but doesn't squash the image at all.
- Playing around with the different overrides.  Everything I try seems to make the images squashed or stretched.
- Giving each of the cameras a height and width of 1, then giving Camera 1 a Viewport Rect X of -0.5 and Camera 2 a Viewport Rect X of 0.5.  When I do this, it attempts to squash Camera 1's entire image to the left side of the screen instead of leaving half the image off the screen as I'd want.

Hopefully I've made this easy enough to understand.  Any suggestions on how I could get this to work properly?

Doghelmer

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: Supporting different aspect ratios in a split-screen mode
« Reply #1 on: August 12, 2016, 08:25:26 am »
I see this post hasn't really gotten any traction.  Unfortunately I'm still completely stumped on this issue -- I'm basically finding it impossible to get my split-screen view working properly across all resolutions.  If there's anything I can do to provide a better explanation of the issue better than I did previously, please let me know, because I'd really like to get this solved.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Supporting different aspect ratios in a split-screen mode
« Reply #2 on: August 20, 2016, 11:54:13 am »
I understand the issue, just not sure how to solve this without changing how the tk2d Camera works... This will be easier with normal unity cameras - Its easy enough to figure out how to get the pixel perfect ratio - beyond that it'll be easier to do that..