playMaker

Author Topic: content scaling for different resolution devices  (Read 2535 times)

szomaza

  • Sr. Member
  • ****
  • Posts: 253
    • View Profile
content scaling for different resolution devices
« on: May 06, 2014, 11:03:24 PM »
How do you do content scaling for different resolution devices effectively using playmaker?
Is there a way to switch texture atlases that all your prefabs and objects in scene get their texture from, depending on the screen resolution detected?

I am using Unity 2D and the only solution I know currently to solve this problem would be: get the 2D Sprite object property of all my objects one by one and replace their sprites to the appropriate one for the currently detected resolution.
:-)

Something more effective?

I read here:
http://v-play.net/doc/vplay-different-screen-sizes/
"The best approach is to use a different image with the higher resolution and use this image version on the iPhone 4 and the low-res version on an iPhone 3GS, which is effectively what Apple is doing by using images with a @2x suffix for the file name."

Thanks,
szomaza

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14684
  • Official Playmaker Support
    • View Profile
Re: content scaling for different resolution devices
« Reply #1 on: May 07, 2014, 05:50:38 AM »
Hi,

 If you are using ngui, there is a Retina pro add on to this that will help you manage and setup atlases properly. Other 2d frameworks may have built in retina and pixel density managers already.

 else, I would actually work with the retina graphics and simply rely on relative screen sizes. If your graphics are all diviable by two, then  it will be good on non retina displays too.

bye,

 Jean

szomaza

  • Sr. Member
  • ****
  • Posts: 253
    • View Profile
Re: content scaling for different resolution devices
« Reply #2 on: May 09, 2014, 09:24:29 AM »
Thanks for the reply.

Wouldn't the textures for retina display textures be to much for a phone or ipod?

I am not using ngui but was just checking out 2D Toolkit.
https://hutonggames.fogbugz.com/default.asp?W717

Can that also do all these things to deal with all the different resolutions?

Anybody who has used 2D Toolkit, please share any findings or at least some encouraging experiences.

Thanks,
szomaza

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14684
  • Official Playmaker Support
    • View Profile
Re: content scaling for different resolution devices
« Reply #3 on: July 16, 2014, 04:46:51 AM »
Hi,

 if you don't exceed in total  2 or 3 atlases at 2048*2048, you should be fine on older ios devices.

 Bye,

 Jean

szomaza

  • Sr. Member
  • ****
  • Posts: 253
    • View Profile
Re: content scaling for different resolution devices
« Reply #4 on: July 18, 2014, 12:25:04 AM »
Hi,

Thanks Jean for the info.
Then I guess I won't be targeting older ios devices.

Br,
szomaza

blazingriver

  • Playmaker Newbie
  • *
  • Posts: 26
    • View Profile
Re: content scaling for different resolution devices
« Reply #5 on: July 23, 2014, 08:18:07 AM »
For the resolution scaling, 2D Toolkit uses 1x, 2x and 4x variations of sprites. You would have to create these variations manually of course but 2D Toolkit would then automatically find and manage them. However, you will have to detect the device yourself (possibly with playmaker, I had a recent similar question: http://hutonggames.com/playmakerforum/index.php?topic=7918.msg38231#msg38231 ) and initiate a simple script to choose what variation to apply depending on the device. 2D Toolkit will handle the rest automatically.

You will probably get a more detailed explanation on the 2D Toolkit documentation. I suggest having a look here http://www.unikronsoftware.com/2dtoolkit/docs/latest/advanced/platform_specific_sprite_collections.html
« Last Edit: July 23, 2014, 08:21:21 AM by blazingriver »

szomaza

  • Sr. Member
  • ****
  • Posts: 253
    • View Profile
Re: content scaling for different resolution devices
« Reply #6 on: July 29, 2014, 10:59:45 PM »
Great info. Thanks blazingriver. I'll check those out.

Br,
szomaza