About multi-resolution solution

  • onselakin
    Likes 0

    Problem Description

    Hey,

    I’ve been watching the video series about setting up a multi-resolution solution (http://www.sonarlearning.co.uk/coursepage.php?topic=game&course=cocos2d-x-multi-device-2). Really nice tutorials but there are some points I can’t seem to get :-)

    I’m a Starling developer so setting up a multi-resolution solution always included creating multiple asset sizes for different resolutions. So based on the resolution I always loaded the relevant spritesheets.

    In the videos, there’s only one set of resources and it seems to work magically in every resolution and I can’t get it :-) So here are my questions:

    1. How does Cocos resize the resources?
    2. If I want to support the huge resolutions of some of the tablets (1600x2560) and the smallest phones (640x960) how should I create my assets to use with this solution? 
    3. What design resolution should I need to specify in code to support all the devices?

    Maybe I missed some key points in the videos, I don’t know but I’d be more than happy if someone could enlighten me :-)

    Thanks.

  • Sonar Systems admin
    Likes 0

    Hi,

     

    Cocos has a design resolution which using the resolution policy of no border strectches the images with distortion. The reoslution chosen works well even on high resolution devices due to the screen size being small.

     

    Hope this helps.

  • onselakin
    Likes 0

    Hi again,

    So if I design the game for a 1600x2560 screen resolution taking the psd file you shared into consideration, the game should work on all the devices, right? What should I specify for the design resolution in code?

    Thank you :-)

  • Sonar Systems admin
    Likes 0

    Yes it should, all the information regarding resolutions are in our videos.

  • onselakin
    Likes 0

    Thanks for the help. I watched the videos all over again. I have one more question.

    Here is the iPad Air screenshot:

    And here is the iPhone 6 Plus screenshot:

    The image I used (the blue background with the word Logo on it) is 768x400. I also set the design resolution to 768x1136 in portrait mode. You can see on iPhone 6 Plus, there is a smaller gap on the right of the Logo text compared to iPad Air. Any idea why? Am I doing something wrong?

    EDIT: Is it because of the NO_BORDER policy because what I understand is NO_BORDER policy zooms the scene to remove the possible borders that may appear around the scene. If that’s the case then I should never design the scene assuming that the width of the screen will be exactly 768 pixels, right?

    Thanks again for the help :-)


  • Sonar Systems admin
    Likes 0

    Yes you are correct, it is because of the NO_BORDER policy.

  • austin32
    Likes 0

    Developing for high-resolution displays often requires different image resources for each image. Because of this, there’s been a need for a more standard way of serving responsive content images – ones that adapt to different resolutions and viewport sizes using softwares similar to rgbfusion

Login to reply