Design Resolution docs need improvement

Design Resolution docs need improvement
0

Design Resolution is a confusing topic for so many (my self at times included). I want to fix this ASAP.

The problem for me is there are so many topics on these forums. I just posted some links here: Multi-resolution code in the default template

Can anyone take the time to write up about Design Resolution. I’ll handle creating the doc for it and publishing it ASAP. A jumping off point would help :slight_smile:

Anyone? @stevetranby @Mars @R101 @dimon4eg

3 Likes

Is design resolution the actual issue though? Many of the questions raised are generally about how to support different aspect ratios, filling the entire screen (to avoid black bars), and to avoid scaling the textures so things look as they should.

Design resolution itself seems to be mixed with those other aspects, so it confuses things. Design resolution should be thought of as a stage, similar to what you would have in Adobe Photoshop and Flash etc. The placement of all the on-screen objects are based off that resolution, and that’s pretty much it.

The real problem is when questions come up regarding supporting multiple aspect ratios, and which of the resolution policies to use. That’s actually the most confusing area. Sure, it may seem simple, in that it requires simple math, but in reality it’s not. It’s knowing what numbers to use in order to make sure everything is still positioned on the screen correctly, that’s the tough part.

Perhaps examples could be provided for each of the resolution policies, so at least the developers would get an idea on when and how to use them.

In addition to that, there’s the setContentScaleFactor(…) call, which adds yet another layer of confusion, and may impact the visuals of the application differently depending on which resolution policy is chosen. It’s the main reason I personally always have it set to 1.0, and just use FIXED_HEIGHT and FIXED_WIDTH depending on device aspect ratio, as I’ve explained in the answer here: multiresolution

3 Likes

well i can surely help but i think this is depend more on Developer too to decide.
because there are many ways to deal with it.

1 Like

Agree.

I can share how I did.
I have only one design for my game 1280x800
I use setDesignResolutionSize with policy SHOW_ALL
I only scale background image to whole screen.

@R101 @dimon4eg @smitpatel88 Let’s create a quick outline of what to talk about in the doc. Then we can fill it in. https://github.com/cocos2d/cocos2d-x-docs/issues/205

@slackmoehrle You mentioned mars, but I thought you wanted to mentioned me - right?

I found the best way to avoid black bars in this (original deleted) article: https://web.archive.org/web/20171102221340/http://blog.6x13.com/2d-asset-scaling-resolution/ - This is now the blueprint for every cocos2d-x project of me :wink:

1 Like

@mars3142 @slackmoehrle
This link is excellent!


This is what I do as well.

2 Likes

Yes, we do similar only.