IPhone : Spritekit scene editor size

on Wednesday, February 25, 2015

I am trying to get into the sprite kit scene editor that recently came out, and having some difficulties. My main problem is that i can't seem to understand the size of it.


The current size is 1024 x 768. So i start adding nodes to it, and then run it as an iPhone app, and now it won't show my nodes. They simple get left out since it resizes it. My problem is, i thought it would handle this automatically (scale it to fit), but it doesn't.


so my question is, how do you handle this? I mean Apple has a lot of different screen sizes now, so how on earth are one supposed to match this? Surely you aren't supposed to create an entire scene for each screen size, there must be a better way? I just have no clue. I thought this code would take care of it (standard code when making a new spriteKit project) in the GameViewController that presents the scene:



// Create and configure the scene.
GameScene *scene = [GameScene unarchiveFromFile:@"GameScene"];
scene.scaleMode = SKSceneScaleModeAspectFill;

// Present the scene.
[skView presentScene:scene];


But it doesn't. It displays it all if i'm running it on an iPad in landscape mode, but not if i switch to portrait or run in any iPhone orientation.


So how do you support multiple screen sizes with this new editor? And if anyone can point me to a resource where i can learn more about this editor i would be thrilled.


Thanks in advance, Best Regards, /JBJ


0 comments:

Post a Comment