Remove a specific list of SKAction from a SKNode

During the development of some interactions between different nodes, I realized I need to remove a specific list of actions from a node. The current version of Sprite-Kit framework provides some instance methods as: removeAllActions() action(forKey...
more »

2017-01-15 20:01 (1) Answers

Nodes not moving

(Swift 3) import SpriteKit import GameplayKit class GameScene: SKScene { var object = SKSpriteNode() override func didMove(to view: SKView) { object = self.childNode(withName: "dot") as! SKSpriteNode } override func touchesBegan(_ tou...
more »

2017-01-15 06:01 (2) Answers

Creating endless background without image

I'm creating a simple game with Swift and SpriteKit. I want to add an endless background (vertically), I only found answers for background with images but I need to do it without image, only background color. I thought about checking if the player is...
more »

2017-01-14 17:01 (1) Answers

Difficulties with ingame currency in my game

I've got a difficulty with implementing a currency as UserDefault in my xcode game, using Swift. My currency will count up as the round goes on, but when the round is over (gameover) my accumulated currency gets set back to zero. This is my current p...
more »

2017-01-14 00:01 (0) Answers

Changing color of sprites with colorBlendFactor

I have a loop making a cluster of spriteNodes. It is a crowd of people. The sprites are just plain white textures as research told me don't use black ones when using colorBlendFactor. I also have an extension for UIColor with a bunch of my own color...
more »

2017-01-13 14:01 (1) Answers

Using a UITableView in Spritekit

I'm currently having an issue. I'm creating a game and I want to be able to use a UITableView to show data (Like levels). However, I'm using strictly SpriteKit and can't seem to get the UITableView and SpritKit to work. I tried creating a variable i...
more »

2017-01-13 03:01 (1) Answers

Use one or multiple SKScenes for Level based Game

I'm making a level based game using SpriteKit. I would like to know the best practice for making level changes. I was originally using one Scene as my gameplay scene and when a level is completed, it removes all nodes in the scene and then adds the o...
more »

2017-01-11 21:01 (1) Answers

How to transition scenes in SpriteKit?

I am creating a game, and where I want to transition scenes. However, I am getting this error when using transitioning scenes: [Graphics] UIColor created with component values far outside the expected range. Set a breakpoint on UIColorBreakForOut...
more »

2017-01-10 06:01 (3) Answers

swift: detect which skaction stopped in group

i have a node bear that has two skactions on it (in a group). Action bearmove is on a loop, while moveUp is not, moveUP should only happen once. let moveUp=SKAction.moveTo(y:50,duration:1.0) let bearAnimate=[SKTexture(imageNamed:"image1"),SKTexture(...
more »

2017-01-06 00:01 (1) Answers

Game Center Challenges in iOS 10

I've implemented Game Center features like achievements and leaderboards, and now I'm working on the challenges. I was under the impression that I didn't have to add any additional code - if I had achievements or leaderboards, players would be able t...
more »

2017-01-03 21:01 (0) Answers

SpriteKit on AppleWatch - How to present a scene?

I made a game for iOS using SpriteKit. Now I wanna make also the version for watchOS. I added a new target and then these files appear to me: If I delete the sks file and then try to present a swift scene as I did for the iOS game the scene appea...
more »

2017-01-03 19:01 (1) Answers

Int into label SpriteKit SKView, hl

I just want to know if is it possible to make a label or anything else who will be a integer and to display it to my gameview. var pvElf = SKLabelNode(fontNamed:"Chalkduster") pvElf.text = "100"; pvElf.fontSize = 45; pvElf.position = CGPoint(x:370, ...
more »

2017-01-03 17:01 (1) Answers

TVOS spritekit game data archive location

I've been trying to save the data of a stage as an archive of a SKScene for my TVOS game. I got it working on a simulator. However, the TVOS apparently doesn't have local storage to put the archive in. The only other places I can figure to put the ...
more »

2017-01-02 20:01 (1) Answers

Declaring global variables in Swift 3 Error

I'm doing a game with Swift 3 and SpriteKit and I'm trying to declare a global variable to work with it in the rest of the GameScene class but I can't. What I did: class GameScene: SKScene { ... let personaje = SKSpriteNode(imageNamed: "Bal...
more »

2017-01-02 18:01 (3) Answers