Hello Guest

Author Topic: Non-standard platform size?  (Read 3896 times)

davedev

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 10
    • View Profile
Non-standard platform size?
« on: August 16, 2013, 04:14:07 pm »
If I have a 2x platform size of 1024 x 768, can I do a non-standard 1x size of 700 x 525? Same aspect ratio, but not an even division of size? The textures would of course be sized to the correct percentage, but is there anything else that would be a problem? The 2x and up would be for iPads. The "1x" would be for a web version.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Non-standard platform size?
« Reply #1 on: August 16, 2013, 07:28:58 pm »
That will likely be an issue.

The whole point of the platform stuff is that your sprites are scaled by the exact proportion, so the sprites are physically the same size, but contain more or less data depending on the platform. Eg. a 1x and 2x sprite would be exactly the same physical size, but the 2x one would contain 2x the data.

While it is possible to change this scaling parameter to work with any arbitrary scales (its just in tk2dSystem.assetPlatforms), you'd be going into unsupported territory there - Its really hard to design in such a way that your texture sizes will scale perfectly and not misalign at different resolutions. Basically, if you changed this so your proportions are correct (you only need to care about height proportions, not width), you would have to make sure all your sprites dont shift about when you switch platform.