Questions tagged [skscene]

An SKScene object represents a scene of content in Sprite Kit. A scene is the root node in a tree of Sprite Kit nodes (SKNode). These nodes provide content that the scene animates and renders for display. To display a scene, you present it from an SKView object. SKScene is Apple technology for use on iOS 7.0 and later.

An SKScene object represents a scene of content in Sprite Kit. A scene is the root node in a tree of Sprite Kit nodes (SKNode). These nodes provide content that the scene animates and renders for display. To display a scene, you present it from an SKView object.

A scene calculates the contents of a new frame by processing the following actions in order:

  • The scene calls its update: method.
  • The scene executes actions on its children.
  • The scene calls its didEvaluateActions method.
  • The scene executes any physics simulations on physics bodies in the scene.
  • The scene calls its didSimulatePhysics method.

Click Here for Apple's Documentation Reference for SKScene.

653 questions
0
votes
1 answer

Cannot present scene with SpriteKit

I have two SKScene SceneA,SceneB. I have implemented two methods(willMoveFromView,didMoveToView) in each scene. Assume, I am currently in SceneA and i want to present SceneB via this code block: SceneB *sceneB = [SceneB…
Igor Prusyazhnyuk
  • 133
  • 2
  • 14
  • 29
0
votes
1 answer

IAD lifecycle - dismiss of ad sends app back to splash screen

I have a simple spritekit app, SKView on intialization shows a splash screen(scene), the user clicks on a button they are taken to the main game scene. Everything works fine, but wanted to add iads to it, so I instantiated an adview in the main…
Speckpgh
  • 3,332
  • 1
  • 28
  • 46
0
votes
0 answers

Loading Banner Ads in View Controller With SKScene Glitches Game?

I'm currently developing a game where the objective is to survive as long as possible (i.e. Doodle Jump, Flappy Bird, Jetpack Joyride, etc) and there's no pause button. Anyways, I have a view controller that presents an SKScene. The moment I…
KingPolygon
  • 4,753
  • 7
  • 43
  • 72
0
votes
0 answers

SKScene Custom Size

I would like to create a new scene so that I can embed a UI element in it (a picker view) but I do not want the scene to take up the entire screen, but rather be smaller. I used the following code: - (void)switchToPickerScene { // Present the…
zeeple
  • 5,509
  • 12
  • 43
  • 71
0
votes
1 answer

pause/play in skscene issue

i have a demo game I'm working on and have implemented the pause play function in the scene. both functions work fine. pausing will stop all actions and play will resume the actions except one action. here is how i implemented the pause/play…
Adrian P
  • 6,479
  • 4
  • 38
  • 55
0
votes
1 answer

SKScene duplicate after a presentViewController

I don't understand why my doesn't work. Use case : Test 1: I launch game, i click on Play button (presentScene) from the first Scene, So i go to second scene. No problem. Test 2: I launch game, i click on Option button (presentViewController) from…
Alexandre Ouicher
  • 856
  • 1
  • 9
  • 15
0
votes
1 answer

Warning: Attempted to present * whose not in the window hierarchy

I have tried to deal with this issue for too long. Please give me any of your thoughts. I am presenting a View Controller from an SKScene by sending a Local Notification. [[NSNotificationCenter defaultCenter] postNotificationName:@"closeScene"…
0
votes
1 answer

How do I present UIViewController from SKscene with social framework?

I am making a game like Flappy Bird. How do I present a UIViewController from SKScene? First of all, I tell my environments Mac OS X 10.9 Xcode 5.0.2 Sprite Kit(framework), social.framework(framework) are added in my project My goal is to…
0
votes
1 answer

Hiding Landscape iAd banners in skscene

I have a view controller called ViewController in which I have two methods, hideAd and showAd: // Method is called when the iAd is loaded. -(void)showAd:(ADBannerView *)banner { // Creates animation. [UIView beginAnimations:nil context:nil]; //…
Max Hudson
  • 9,961
  • 14
  • 57
  • 107
0
votes
0 answers

SKView Resizing To Fit 3.5in Screen Correctly?

I have an SKView that looks great both on a 4in and 3.5in device. The problem is that on the 3.5in device, the bottom part of the view gets cut off (As if attached to the top). How can I have the top (sky) cut off instead? So that the bottom of the…
KingPolygon
  • 4,753
  • 7
  • 43
  • 72
0
votes
2 answers

Presenting a View Controller with an xib from an SKScene

I have tried many things, none of which are working. I have an SKScene, and when the game is over, I want it to go back to the original view controller. Thank you in advance. I have tried this in my SKScene homeScreenViewController *viewCont =…
user2918201
  • 52
  • 1
  • 7
0
votes
3 answers

why my high score label updates only once?

I want to implement the high score label in a demo project I'm working on. I declare the integer and long integer as follows: SKLabelNode *_scoreLabel; int _meter; SKLabelNode *_highScoreLabel; NSInteger _meter1; then in -…
Adrian P
  • 6,479
  • 4
  • 38
  • 55
0
votes
0 answers

Positioning SKView / SKScene that has SKSceneScaleModeAspectFit?

I'm using a basic setup with a SKView to display a SKScene. The SKScene has a pre-defined size and uses a scale mode SKSceneScaleModeAspectFit: - (void)viewDidLoad { [super viewDidLoad]; SKView *skView = (SKView *)self.view; SKScene…
MkkLn
  • 23
  • 4
0
votes
2 answers

SKScene not rendering when I need to update a SKLabelNode

I am programming a game, and using a SKLabel to view the current score. The problem is that when score changes it doesn't display the change in the screen at the moment, it does after a second more or less. What can I do to see the changes in the…
user2154826
0
votes
1 answer

Pausing SKScene at startup

I want to pause my SKScene within my SKScene class. I know the following code works to pause the Scene and the game has already started. self.scene.view.paused = YES; But I want to pause my scene AS SOON as my scene starts from WITHIN my class. So…
4GetFullOf
  • 1,738
  • 4
  • 22
  • 47