Quantcast
Channel: cocos2d-x - Cocos Forums
Viewing all articles
Browse latest Browse all 2748

Best way to handle proportions for Universal (iOS) endless runner?

$
0
0

@matthewlehew wrote:

I'm getting ready to wrap up my first project, and I decided I would like to make the app universal (iPhone and iPad). It's a little later than an ideal time do decide to implement such functionality, to be sure. I'm using a precompiled Cocos2d-x 3.10 with the scene staged in Cocos Studio 2.

The difficulty is that the game is an endless runner using portrait mode, and switching from the 16x9 iPhone orientation to a 4x3 will cause inherent adjustments to the difficulty of the game. For example, moving to portrait 4x3 means the user can see the gaps relatively sooner and have more time to adjust, unless I utilize a Cocos2dx resolution mode like Show all. Unfortunately, any mode would result in distortion, cropping, or a border. A border, like the one that 'Show all' would produce, is the only way that gameplay wouldn't be affected, but it would be ugly.

My current solution that I'm considering implementing is to copy all the assets into a separate Cocos Studio project and export to a separate .csb file. Most, if not all, of the game is structured by positioning and moving according to a factor of contentSize, so the manual adjustments would be minimal. Then I can use Xcode to determine what device is being utilized and load the appropriate .csb, and the logic code should all be the same.

The obvious drawback is that any adjustment that I make to MainScene.csb would then have to be duplicated carefully in MainSceneiPad.csb. But I'll deal with that if it's the best way to achieve native resolution without any change to gameplay difficulty.

So, my question is this: am I overlooking a dead simple way to achieve this? I don't want to invest the time/effort it would take to implement this and realize I didn't have to, haha.

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 2748

Latest Images

Trending Articles



Latest Images