Designing for iPhone X

Designing for iPhone X
0.0 0

#1

A new iPhone X give a bit trouble when adopting your game. Take a look:
https://developer.apple.com/videos/play/fall2017/801/


iPhone-x full screen support for old projects
SpriteBuilderX - editor for Cocos2d-X with C++ support
Multi-resolution code in the default template
iPhone X - How to draw in the corners?
iPhone X - How to draw in the corners?
iPhone X - How to draw in the corners?
#2

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

So, anyone already updated any game for iPhone X?


#3

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


#4

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:


#5

I’m using SBX and have no problems.


#6

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


#7

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:


#8

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 ?


#9

What is your view set at in AppDelegate.mm?

Edit: I mean AppDelegate.cpp. Sorry.


#10

I have’nt change anything in AppDelegate.mm


#11

do You mean AppDelegate.cpp ?


#12

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 @KAMIKAZE he did a lot of research.


#13

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.