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
-1
votes
2 answers

SKScene vertically squashed

My SKScene is vertically squashed. I have added an SKEmitterNode, but this is clearly being squished and I have no idea why. I have another emitter in another scene which is not doing this and all the code appears to be exactly the…
Bradley Mackey
  • 6,777
  • 5
  • 31
  • 45
-1
votes
1 answer

Is there a more accurate way to see if two sprites intersect?

CGRect rect4 = CGRectMake(rock.position.x, rock.position.y, rock.size.width, rock.size.height); CGRect bulletRect = CGRectMake(bullet.position.x, bullet.position.y, bullet.size.width, bullet.size.height); if (CGRectIntersectsRect(bulletRect, rect4))…
-2
votes
1 answer

How do I save the user's level on my game?

I have a maze game that I coded with swift that does not save levels. Currently, when the user closes the app, nothing is saved and the user has to start playing the game from level 1 again. I have a different .swift and .sks file for every level,…
AglaiaZ
  • 31
  • 6
-2
votes
1 answer

iOS game Development with Swift. SKScene/SprikeKit changes?

I'm new to iOS game development, I've been following this tutorial series and if someone doesn't mind taking a peek at this video(near the end) https://www.youtube.com/watch?v=s0hRlSlT6Zw&list=PL6gx4Cwl9DGDgp7nGSUnnXihbTLFZJ79B&index=34 I've copied…
MrShemp31
  • 21
  • 2
-2
votes
1 answer

Setting screen orientation from inside SKScene

My game is implemented in a single SKScene object. A button (SKSpriteNode) lets the user switch from landscape to portrait mode. Well, it should. But I can't make this work. There are many discussions on this but they are all rather complicated and…
John Dorsey
  • 157
  • 1
  • 11
-3
votes
1 answer

Rendering Vector graphics using Metal/SpriteKit

I wish to render vector shapes (CGPath) using Metal to an offscreen texture. However as I see, it is very difficult to draw thick lines using Metal which takes care of antialiasing and other issues. So it's going to involve lot of work to draw…
Deepak Sharma
  • 5,577
  • 7
  • 55
  • 131
-4
votes
1 answer

Sk scene won't fit on iPad?

I'm using sprite kit; my scene won't fit on the iPad, it's like cut off, I've tried everything I know but still can't get it to work. It works fine on all the iPhones but has a problem when it comes to the iPad
Sufyaan Ibrahim
  • 129
  • 1
  • 7
-4
votes
2 answers

Why is width of view incorrect? SKScene

My score label sprite node x position is set to size.width * 0.4 and it looks like this: (The 'Time' sprite node on the right simply adds 100 to the score sprite node x position) If I change the score label sprite node x position to size.width *…
Reece Kenney
  • 2,734
  • 3
  • 24
  • 57
1 2 3
43
44