Designing for iPhone X

A new iPhone X give a bit trouble when adopting your game. Take a look:

More updated resources - https://developer.apple.com/ios/update-apps-for-iphone-x/

So, anyone already updated any game for iPhone X?

I just wonder how other people solve this problem, any examples :slight_smile: ?

Hi,
I wonder the same thing that you. Anyone already updated any game for iPhone X? I wonder how can I put the game always into the safe area, maybe exists some magic method? :slight_smile:

I’m using SBX and have no problems.

Is really neccesary use a tool for adapt it? I imagine some portion of code that adapt it.

I think no, but just described how I solve it. Your idea in a code could be the same, but you have to create and write it… and I just clicked a couple of buttons :slight_smile:

My game is a landscape game with fixed_height policy. however, on iphone X i noitced it doesnt use all available height. any reason why ?

What is your view set at in AppDelegate.mm?

Edit: I mean AppDelegate.cpp. Sorry.

I have’nt change anything in AppDelegate.mm

do You mean AppDelegate.cpp ?

I so do, I apologize. Yes, You should have code that looks like:

static cocos2d::Size largeResolutionSize = cocos2d::Size(2048, 1536);

if(!glview) {
#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) || (CC_TARGET_PLATFORM == CC_PLATFORM_LINUX)
        glview = GLViewImpl::createWithRect("programmer-guide-samples", cocos2d::Rect(0, 0, designResolutionSize.width, designResolutionSize.height));
#else
        glview = GLViewImpl::create("programmer-guide-samples");
#endif
        //director->setOpenGLView(glview);
    }

There are also several threads about iPhone X, some of them even more detailed than this one. Courtesy of @anon98020523 he did a lot of research.

Well, yes, after research I did it support easily but using SBX SpriteBuilderX - editor for Cocos2d-X with C++ support. So I can’t help here… or you need to use SBX.