0
votes

Making my 1st Sprite Kit game & almost finished it. Just getting my images finalized. Problem is, with the addition of iPhone 6 & 6 Plus, I am having issues figuring out how to name my game assets. For instance, one of my several background images is called "1MBack.png". Sometimes people write "Default–[email protected]" and I try to figure out if I need the "Default–568h" part in my game asset names. The naming convention I used for my art is as following:

<< 1x (iPhone 2G, 3G, 3GS) = 1MBack.png >> << 2x (iPhone 4, 4s) = [email protected] (640x1136) >> << Retina 4 2x (iPhone 5, 5s) = [email protected] (750x1334) >> << 3x (iPhone 6 Plus) = [email protected] >>

Did I name my image's correctly? What about iPhone 6 - do I name an image for it [email protected] or [email protected]? It's important to me to get these names right because I sat for quite a while making each asset for each screen and want them utilized accordingly.

One final question: when making the assets in photoshop, as I was sizing them, I choose PPI according to the PPI of the screen the asset would be used on. So the 1x (iPhone 2G, 3G, 3GS) 1MBack.png has a PPI of 163. The 2x (iPhone 4, 4s) [email protected] has a PPI of 326. Is this correct? I'm worried about this also, because I read someone writing to make assets in PPI 72. Please clarify this.

1

1 Answers

1
votes

Set different name for Widescreen images(new iPhones) like name-retina

-(void)didMoveToView:(SKView *)view
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
        CGSize result = [[UIScreen mainScreen] bounds].size;
        if (result.height == 480) {//Old iPhone detected
        SKSpriteNode *bg = [SKSpriteNode spriteNodeWithImageNamed:@"1MBack"];//2G, 3G, 3GS
        //By the way you have to set different sprite position for devices here   
        }else{//New iPhone detected
        SKSpriteNode *bg = [SKSpriteNode spriteNodeWithImageNamed:@"1MBack-retina"];//5, 5S, 6, 6Plus
        }
    }
}