Keep Part of a SpriteKit Scene from Scrolling

August 8th, 2016

Filed under: Game Development, iOS Development, Mac Development | Be the first to comment!

I covered the basics of scrolling a SpriteKit scene with a camera node in my Scrolling a SpriteKit Scene with SKCameraNode article. But I didn’t cover one thing many games need. Many games use part of the screen to display vital information to the player such as score and health. When you scroll the game […]


Accessing a SpriteKit Scene’s View Controller

July 11th, 2016

Filed under: Game Development, iOS Development, Mac Development | Be the first to comment!

If you’re using Game Center in a SpriteKit game, you present Game Center view controllers to show things like leaderboards and achievements. To present a Game Center view controller, you need to access the SpriteKit scene’s view controller. The good news is accessing the scene’s view controller takes only one line of code. Adding the […]


Authenticating Game Center’s Local Player in a SpriteKit Game in Swift

June 6th, 2016

Filed under: Game Development, iOS Development, Mac Development | Be the first to comment!

Authenticating the local player for Game Center in a SpriteKit game requires two steps. The first step is to call the GKLocalPlayer class method localPlayer, which gives you access to Game Center’s local player. The second step is to supply a closure for the local player’s authenticateHandler property. This closure takes two arguments: a view […]


Saving Game Data with NSCoding in Swift

March 23rd, 2016

Filed under: Game Development, iOS Development, Mac Development | 11 comments

I reached a point in developing LetterMiner where I wanted to save the game when the player quit so they could pick up where they left off. I didn’t find a lot of information online on saving data in SpriteKit games so I’ve decided to share what I’ve learned. I hope it helps other people. […]


Scrolling a SpriteKit Scene with SKCameraNode

December 9th, 2015

Filed under: Game Development, iOS Development, Mac Development | 6 comments

Apple added the SKCameraNode class to SpriteKit in iOS 9 and OS X 10.11 to make it easier to scroll and zoom in SpriteKit scenes. This article shows what I’ve learned about scrolling SpriteKit scenes. This article assumes you have created a SpriteKit Xcode project and a scene for the project. This article focuses on […]