TL;DR: I have a SpriteKit game that looks great in 4' screens, need a quick fix (like using a scrollview to contain a SKScene) for 3.5' screens without coding everything again, thanks!
I currently finished a game I was working on SpriteKit and I'm planning to upload it to the AppStore, but here is the problem: I designed the game to work perfectly on 4 inch screen devices so in 3.5 it looks terrible and I'm afraid Apple will hand me the game back to correct this problem. Therefore I have considered the following options:
- Use a ScrollView to present the Scenes by using the following method:
`
SKView *skView = (SKView *)self.view;
// Create and configure the scene.
SKScene *scene = [BIMainMenu sceneWithSize:skView.bounds.size];
scene.scaleMode = SKSceneScaleModeAspectFill;
UIScrollView *scrollView = [[UIScrollView alloc]initWithFrame:self.view.bounds];
scrollView.contentSize = CGSizeMake(320, 568);
[scrollView addSubview:skView];
[self.view addSubview:scrollView]; //expection thrown here
// Present the scene.
[skView presentScene:scene];
`
But this method does not work, it throughs an exception when trying to add the scrollView to the view. Maybe I'm doing something wrong here?
2.Use conditionals in every single line of code to check the device size and setup the images correctly: This might be the way to go but I really hope there is another way since the main game area relies on the "board" being 568 pixels long and it might also mess up the game logic entirely. (Yes, maybe bad planning.
3.Use something along this answer: https://stackoverflow.com/a/19096256/2328918 But I think some of the setup might also mess up my code.
4.Also tried changing the scene's scaleMode but does not seem to work either.
Thank you for your suggestions and tips, I'm looking for the "short" answer in the sense that adding a Scrollview to the game will simply allow 3.5 users to "play" the game but not really tackle the problem but I would really like to ship this out as version 1.0 and then work on improving the experience for 3.5 screens.