Trouble understanding the translation from design resolution to screen resolution, and trouble showing whole sprite

I am grouping these questions under the same topic because they might all be related.

I am programming a game in Cocos2d-x, and even though I read the hard-to-understand multi-resolution section(s), I don’t get what the scale factor is.

I also get what design resolution is, but I don’t get how we go from design resolution to screen resolution. Does Cocos2d-x automatically calculate how much to scale the sprite up by after it is scaled down to the design resolution?

Finally, I made an art asset with a resolution of 1538 x 2048. I haven’t changed the app delegate code at all, so the scaling factor and design resolution have not changed (the design resolution is 480x320). However, when I run the app on the iPad Air simulator, it cuts off the sides, which doesn’t really make sense because the resolution of the asset is exactly the same as the resolution of the iPad (and, to be clear, the iPad is in portrait).

I’m sorry what I am writing is confusing; I tried my best at describing my dilemma.

EDIT: I figured it out. For those that are wondering and are trying to program a portrait game, the default design resolution and default asset resolutions (small, medium, and largeResolutionSize by default) are in landscape; you need to change it to portrait. I still want to know how the scaling system/design ratio to screen ratio system works, and also something that I want answered: what happens if the format ratio of the design resolution is different from the ratio of the screen resolution? Is it that I can’t access the positions that are outside of the ratio of the design resolution?

Read the code example below. You don’t have to go anywhere. Design resolution is set by you and device/screen resolution is the resolution of your device.

You are basically dividing the screen resolution by the design resolution to get the scaling factor.

No, you have to calculate it yourself based on your design decisions. E.g. scaling to the height, width or both and so on.

Your device resolution is in portrait mode, but your design resolution is in landscape mode.

Because your modes differ.

It will be clipped or scaled depending on the scaling policy.

That also depends on the scaling policy used.

Just read this http://www.cocos2d-x.org/wiki/Detailed_explanation_of_Cocos2d-x_Multi-resolution_adaptation

and that: http://www.cocos2d-x.org/wiki/Multi_resolution_support

I said that I didn’t find those two articles helpful, they were hard to read (they don’t seem to be written by someone who can write good English).

I think I understand how the scaling works now, let me know if I am right: If the resolution is higher than mediumResolutionSize but not as big as largeResolutionSize, the sprite might be bigger than would be ideal ( and ideal would be scaling for the device’s exact resolution).

Well you did no tell, which exact docs you were referring to.
Dunno if it was written by the Chinese department or the American one.

The sprite will be down-scaled, not up-scaled. So yes, the sprite is bigger.

No, the ideal would be no scaling at all. E.g. largeResolutionSize matches your device resolution.

The scaling factor is not scaling the assets, but the OpenGL coordinates.
It can be 2x or whatever, but the assets do not get scaled, as they match the OpenGL and texture coordinates of the device resolution. The textures themselves would have a 1:! mapping aka a scaling factor of 1.