Hello Guest

Author Topic: Multiple Resolutions & Pixel Perfect  (Read 4022 times)

GreenflyStudios

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 3
    • View Profile
Multiple Resolutions & Pixel Perfect
« on: October 18, 2013, 11:45:01 pm »
Hi there,

I've generated my assets at 1600x2560 in anticipation of covering all device resolutions. I've now set up 1x, 2x & 4x atlases. Being a long-time iOS Cocos2D user, I've set the native res to 1x (400x640) & the preview res to 320x480. The camera has also been set to pixel perfect.

My question is do I need to do anything more? When switching between different stock preview options (iPhone 5, iPad), my textures become incredibly small. What is the best way to detect the device resolution and select the correct atlas?

Any help is greatly appreciated.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Multiple Resolutions & Pixel Perfect
« Reply #1 on: October 19, 2013, 12:59:43 pm »
You will need a combination of camera scaling + texture density.
1x, 2x and 4x sprites will be exactly the same sizes.

If you use the tk2dCamera, you can pretty much set up the scaling as needed there in the overrides tab. Check the reference page here (http://www.2dtoolkit.com/docs/latest/reference/tk2dcamera.html) for details on how overrides work.