Hello Guest

Author Topic: Having trouble understanding tk2d overrides  (Read 3119 times)

Angry_Ed

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 2
    • View Profile
Having trouble understanding tk2d overrides
« on: April 01, 2015, 09:07:17 pm »
Apologies as I'm sure this has been asked several times, but I've spent the last two weeks trying to understand tk2D overrides to create the results I want for my game, but I still don't really understand it.

Basically I'm trying to make a vertical scrolling space shooter, also trying to put it on mobile, and as such I want what I see in the camera's viewport at 480x800 to be the same as it is at 1080x1920 (just for example). But no matter what I try for an override, I can't get them to stay the same. Stretch to fit seems to kind of work (for portrait resolutions anyway) but I know that won't be uniform scaling.

I guess the question is if what my actual problem is is that I just need to set up platform-specific collections (i.e. 1x, 2x, 4x) and have a bounding box of sorts that just creates black bars when there's "overscan". I'll need the latter anyway, I just don't really understand how I'd make that. Ultimately I want the game screen/viewport itself to be visually consistent, so that people playing on smaller screens don't actually have a smaller playing field than people on larger screens.

Attachments showing current native resolution (480x800) and  WXGA portrait (800x1280) using fit height are below.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Having trouble understanding tk2d overrides
« Reply #1 on: April 02, 2015, 04:02:28 pm »
I don't get what you want. If you want to see exactly the same data in 480x800 in 1080x1920, stretch to fit is the only thing that will work. There is no uniform multiple that will scale 480x800 to 1080x1920, the aspect ratios are different - you either display more on either X or Y and letterbox (all you need to do is position the black boxes so its at the boundaries of your native resolution).

Platform collections will make no difference to what you see, they just change the amount of detail you see, i.e. 2x detail, or 0.5x detail to save on texture memory, etc.

480x800 and 800x1280 will not scale uniformly either. Your 2 options - non uniform scaling or stretch to fit.